Bug #7687

ObjectAccess doesn't allow numeric indexes for arrays

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

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

100%

Estimated time:
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).

#1

Updated by Robert Lemke about 11 years ago

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

Applied in changeset r4276.

Also available in: Atom PDF