Bug #7687

ObjectAccess doesn't allow numeric indexes for arrays

Added by Robert Lemke about 9 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
Reflection
Start date:
2010-05-06
Due date:
% Done:

100%

PHP Version:
Has patch:
Complexity:

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 (diff)
Added by Robert Lemke about 9 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 9 years ago

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

Applied in changeset r4276.

Also available in: Atom PDF