Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Hotfix: Changed array_walk to foreach in Zend\Stdlib\Hydrator\ArraySerializable #4259

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 7 additions & 6 deletions library/Zend/Stdlib/Hydrator/ArraySerializable.php
Expand Up @@ -31,15 +31,16 @@ public function extract($object)
));
}

$self = $this;
$data = $object->getArrayCopy();
array_walk($data, function (&$value, $name) use ($self, &$data) {
if (!$self->getFilter()->filter($name)) {

foreach ($data as $name => $value) {
if (!$this->getFilter()->filter($name)) {
unset($data[$name]);
} else {
$value = $self->extractValue($name, $value);
continue;
}
});

$data[$name] = $this->extractValue($name, $value);
}

return $data;
}
Expand Down