Fix closure bug.
This commit is contained in:
parent
7a89570bd5
commit
7b937b3fdc
|
@ -2206,15 +2206,16 @@ class JsonLdProcessor {
|
||||||
}
|
}
|
||||||
// handle index container (skip if value is not an object)
|
// handle index container (skip if value is not an object)
|
||||||
else if($container === '@index' && is_object($value)) {
|
else if($container === '@index' && is_object($value)) {
|
||||||
|
$processor = $this;
|
||||||
$expand_index_map = function($active_property) use (
|
$expand_index_map = function($active_property) use (
|
||||||
$active_ctx, $options, $value) {
|
$processor, $active_ctx, $options, $value) {
|
||||||
$rval = array();
|
$rval = array();
|
||||||
$keys = array_keys((array)$value);
|
$keys = array_keys((array)$value);
|
||||||
sort($keys);
|
sort($keys);
|
||||||
foreach($keys as $key) {
|
foreach($keys as $key) {
|
||||||
$val = $value->{$key};
|
$val = $value->{$key};
|
||||||
$val = JsonLdProcessor::arrayify($val);
|
$val = JsonLdProcessor::arrayify($val);
|
||||||
$val = $this->_expand(
|
$val = $processor->_expand(
|
||||||
$active_ctx, $active_property, $val, $options, false);
|
$active_ctx, $active_property, $val, $options, false);
|
||||||
foreach($val as $item) {
|
foreach($val as $item) {
|
||||||
if(!property_exists($item, '@index')) {
|
if(!property_exists($item, '@index')) {
|
||||||
|
|
Loading…
Reference in a new issue