Skip to content
Snippets Groups Projects
Commit 55b1c6b2 authored by Will Hearn's avatar Will Hearn Committed by Mike Ryan
Browse files

Issue #2731697 by sylus: PHP 7 Seg Fault in migrate_example_advanced

parent a07bea19
No related branches found
No related tags found
No related merge requests found
......@@ -48,12 +48,13 @@ class Json extends DataParserPluginBase implements ContainerFactoryPluginInterfa
// expected depth, pull that array out as a distinct item.
$identifierDepth = $this->itemSelector;
$items = [];
$iterator->rewind();
while ($iterator->valid()) {
$iterator->next();
$item = $iterator->current();
if (is_array($item) && $iterator->getDepth() == $identifierDepth) {
$items[] = $item;
}
$iterator->next();
}
return $items;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment