ArrayIterator casted to array should result to the storage array
commitfd4f120699fafcdb70e50e5c7d5a482ef5b71b7c
authorLiran Nuna <liranuna@fb.com>
Mon, 14 Apr 2014 17:48:04 +0000 (14 10:48 -0700)
committerSara Golemon <sgolemon@fb.com>
Mon, 14 Apr 2014 23:58:47 +0000 (14 16:58 -0700)
tree3917ec3f1ef629b2610a1b6aa113d70a6aa446c2
parent16d54a53c8f80c5d7d8ab60139add97203bb14e2
ArrayIterator casted to array should result to the storage array

ArrayIterator was not correctly casted to array. This diff corrects the issue by overriding the array conversion method.

Fixes #2214

Reviewed By: @ptarjan

Differential Revision: D1270947
hphp/runtime/base/object-data.cpp
hphp/runtime/ext/ext_array.h
hphp/system/systemlib.h
hphp/test/slow/array_iterator/cast_to_array.php [new file with mode: 0644]
hphp/test/slow/array_iterator/cast_to_array.php.expect [new file with mode: 0644]