Commit 4d58948c authored by git's avatar git Committed by mikeryan

Issue #2827805 by Ben Buske: Json Parser produces error with empty/root item selector

parent 5be132b6
......@@ -61,7 +61,9 @@ class Json extends DataParserPluginBase implements ContainerFactoryPluginInterfa
// Otherwise, we're using xpath-like selectors.
$selectors = explode('/', trim($this->itemSelector, '/'));
foreach ($selectors as $selector) {
$source_data = $source_data[$selector];
if (!empty($selector)) {
$source_data = $source_data[$selector];
}
}
return $source_data;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment