Bug #7687

ObjectAccess doesn't allow numeric indexes for arrays

Added by Robert Lemke about 5 years ago. Updated almost 5 years ago.

Status:Resolved Start date:2010-05-06
Priority:Should have Due date:
Assigned To:Robert Lemke % Done:

100%

Category:Reflection
Target version:TYPO3 Flow Base Distribution - 1.0 alpha 9
PHP Version: Complexity:
Has patch: Affected Flow version:

Description

When trying to retrieve a value from an array with a numeric index, the ObjectAccess::getProperty() method throws an exception because $propertyName must be a string. However, we should allow integers in for these cases (when $subject is an array or implements \ArrayAccess).

Associated revisions

Revision 39c1e80b
Added by Robert Lemke about 5 years ago

[~TASK] FLOW3 (Core): The bootstrap now omits classes whose name ends with "Exception" when initializing the ReflectionService. Resolves #7688
[+BUGFIX] FLOW3 (Reflection): ObjectAccess->getProperty() now allows numeric indexes and supports \ArrayAccess objects. Resolves #7687

History

#1 Updated by Robert Lemke about 5 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r4276.

Also available in: Atom PDF