[BUGFIX] Support \ArrayAccess objects with getter methods in ObjectAccess 21/50521/6
authorSascha Egerer <sascha@sascha-egerer.de>
Mon, 7 Nov 2016 10:58:39 +0000 (11:58 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Mon, 7 Nov 2016 22:12:14 +0000 (23:12 +0100)
commit4fe96a6934744b52a88609499e863f93dec8f343
tree936ff371fbb0f5ff826e8b9c167cfeca5174f80c
parentc52d0e7bcc4e3b7e5ba2344e05a9222f31334e84
[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>
typo3/sysext/extbase/Classes/Reflection/ObjectAccess.php
typo3/sysext/extbase/Tests/Unit/Reflection/Fixture/ArrayAccessClass.php
typo3/sysext/extbase/Tests/Unit/Reflection/ObjectAccessTest.php