[BUGFIX] Support \ArrayAccess objects with getter methods in ObjectAccess
In #66995 the extbase ObjectAccess has been cleaned up and introduced a behavior where it is not possible anymore to call the getter of an object that implements \ArrayAccess. The problem is avoided by only using array-accessing if the offset is found to exist. If not, the instance is handled as any other object. Change-Id: Ie6b598d93fd7171d0b6c37259e424794861e31ed Resolves: #78589 Related: #66995 Releases: master Reviewed-on: https://review.typo3.org/50521 Reviewed-by:Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Wouter Wolters <typo3@wouterwolters.nl> Tested-by:
Wouter Wolters <typo3@wouterwolters.nl>
Showing
- typo3/sysext/extbase/Classes/Reflection/ObjectAccess.php 1 addition, 1 deletiontypo3/sysext/extbase/Classes/Reflection/ObjectAccess.php
- typo3/sysext/extbase/Tests/Unit/Reflection/Fixture/ArrayAccessClass.php 8 additions, 0 deletions...xtbase/Tests/Unit/Reflection/Fixture/ArrayAccessClass.php
- typo3/sysext/extbase/Tests/Unit/Reflection/ObjectAccessTest.php 20 additions, 0 deletions...sysext/extbase/Tests/Unit/Reflection/ObjectAccessTest.php
Please register or sign in to comment