« Previous | Next » 

Revision cf1e9e3e


Added by Bastian Waidelich over 8 years ago

[BUGFIX] fix ObjectAccess::getProperty() for getters in ArrayAccess objects

With I2abbbd5924cd0177ad8a31cb01c2953dd5ba39fd a regression was introduced
that prevented ObjectAccess::getProperty() to work on objects implementing ArrayAccess
and providing custom getters.

Code to reproduce:
\TYPO3\Flow\Reflection\ObjectAccess::getProperty(new \ArrayObject(), 'iteratorClass')

expected: "ArrayIterator"
actual: Exception

This change fixes this by checking arrays and ArrayAccess objects separately.

Change-Id: I31355c9b4ace868cff7d5ea1c4e1b3735b1225f6
Fixes: #46491
Related: #42723
Releases: master

  • added
  • modified
  • copied
  • renamed
  • deleted