Bug #37571

Inherited proxies fail when implementing __clone

Added by Kira Backes about 3 years ago. Updated about 3 years ago.

Status:New Start date:2012-05-29
Priority:Must have Due date:
Assigned To:- % Done:

0%

Category:AOP
Target version:-
PHP Version:5.4 Complexity:
Has patch:No Affected Flow version:Git master

Description

This seems to be exclusive for PHP 5.4
Error thrown (in development mode):
Notice: Undefined property: [...]Class::$FLOW3_AOP_Proxy_targetMethodsAndGroupedAdvices

Change

 435                 $proxyClass->addProperty('FLOW3_Aop_Proxy_targetMethodsAndGroupedAdvices', 'array()');
 436                 $proxyClass->addProperty('FLOW3_Aop_Proxy_groupedAdviceChains', 'array()');
 437                 $proxyClass->addProperty('FLOW3_Aop_Proxy_methodIsInAdviceMode', 'array()');

to

        $proxyClass->addProperty('FLOW3_AOP_Proxy_targetMethodsAndGroupedAdvices', 'array()', 'protected');
        $proxyClass->addProperty('FLOW3_AOP_Proxy_groupedAdviceChains', 'array()', 'protected');
        $proxyClass->addProperty('FLOW3_AOP_Proxy_methodIsInAdviceMode', 'array()', 'protected');

in /TYPO3/FLOW3/AOP/Builder/ProxyClassBuilder.php

Associated revisions

Revision c6e671cf
Added by Christian Müller 7 months ago

[BUGFIX] AOP works with __clone call on parent objects

If, for example, you extend an entity which implements __clone
the AOP Framework breaks with an warning in development mode,
that it cannot access Flow_Aop_Proxy_targetMethodsAndGroupedAdvices.

Solution is to check if the private
Flow_Aop_Proxy_targetMethodsAndGroupedAdvices property is
accessible and otherwise skipping the Advice call.

Change-Id: I96f7d15acb0d1149dac958b35218695ed0c744b2
Related: #37571
Releases: master, 2.3, 2.2, 2.1

Revision 0850d92c
Added by Christian Müller 7 months ago

[BUGFIX] AOP works with __clone call on parent objects

If, for example, you extend an entity which implements __clone
the AOP Framework breaks with an warning in development mode,
that it cannot access Flow_Aop_Proxy_targetMethodsAndGroupedAdvices.

Solution is to check if the private
Flow_Aop_Proxy_targetMethodsAndGroupedAdvices property is
accessible and otherwise skipping the Advice call.

Change-Id: I96f7d15acb0d1149dac958b35218695ed0c744b2
Related: #37571
Releases: master, 2.3, 2.2, 2.1

Revision 7a9930bf
Added by Christian Müller 7 months ago

[BUGFIX] AOP works with __clone call on parent objects

If, for example, you extend an entity which implements __clone
the AOP Framework breaks with an warning in development mode,
that it cannot access Flow_Aop_Proxy_targetMethodsAndGroupedAdvices.

Solution is to check if the private
Flow_Aop_Proxy_targetMethodsAndGroupedAdvices property is
accessible and otherwise skipping the Advice call.

Change-Id: I96f7d15acb0d1149dac958b35218695ed0c744b2
Related: #37571
Releases: master, 2.3, 2.2, 2.1

Revision 2a2351c0
Added by Christian Müller 7 months ago

[BUGFIX] AOP works with __clone call on parent objects

If, for example, you extend an entity which implements __clone
the AOP Framework breaks with an warning in development mode,
that it cannot access Flow_Aop_Proxy_targetMethodsAndGroupedAdvices.

Solution is to check if the private
Flow_Aop_Proxy_targetMethodsAndGroupedAdvices property is
accessible and otherwise skipping the Advice call.

Change-Id: I96f7d15acb0d1149dac958b35218695ed0c744b2
Related: #37571
Releases: master, 2.3, 2.2, 2.1

History

#1 Updated by Bastian Waidelich about 3 years ago

  • Project changed from TYPO3 Flow Base Distribution to TYPO3.Flow

#2 Updated by Karsten Dambekalns about 3 years ago

  • Category set to AOP
  • PHP Version set to 5.4
  • Has patch set to No

Also available in: Atom PDF