fix SplObjectStorage output in future HHVM releases
- Objects are stored indexed by hash - However, when iterating, key() needs to return 0..n instead So, HHVM's added a variable to keep track of the fake key.
This commit is contained in:
parent
96262075d7
commit
5277ca9d11
|
|
@ -280,6 +280,9 @@ class Exporter
|
|||
} else if (property_exists('\SplObjectStorage', 'storage')) {
|
||||
unset($array['storage']);
|
||||
}
|
||||
if (property_exists('\SplObjectStorage', '__key')) {
|
||||
unset($array['__key']);
|
||||
}
|
||||
foreach ($value as $key => $val) {
|
||||
$array[spl_object_hash($val)] = array(
|
||||
'obj' => $val,
|
||||
|
|
|
|||
Loading…
Reference in New Issue