Work on a copy as recursion-context changes the arrays

This commit is contained in:
Bob Weinand 2016-11-18 11:33:43 +01:00 committed by GitHub
parent 7dfcd2418a
commit ecbefe18c8
1 changed files with 3 additions and 2 deletions

View File

@ -250,11 +250,12 @@ class Exporter
return 'Array &' . $key;
}
$array = $value;
$key = $processed->add($value);
$values = '';
if (count($value) > 0) {
foreach ($value as $k => $v) {
if (count($array) > 0) {
foreach ($array as $k => $v) {
$values .= sprintf(
'%s %s => %s' . "\n",
$whitespace,