From 7b937b3fdccddeef7733444cec003d318df5f3d7 Mon Sep 17 00:00:00 2001 From: Dave Longley Date: Fri, 9 Aug 2013 14:11:52 -0400 Subject: [PATCH] Fix closure bug. --- jsonld.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jsonld.php b/jsonld.php index ed99343..debb62a 100644 --- a/jsonld.php +++ b/jsonld.php @@ -2206,15 +2206,16 @@ class JsonLdProcessor { } // handle index container (skip if value is not an object) else if($container === '@index' && is_object($value)) { + $processor = $this; $expand_index_map = function($active_property) use ( - $active_ctx, $options, $value) { + $processor, $active_ctx, $options, $value) { $rval = array(); $keys = array_keys((array)$value); sort($keys); foreach($keys as $key) { $val = $value->{$key}; $val = JsonLdProcessor::arrayify($val); - $val = $this->_expand( + $val = $processor->_expand( $active_ctx, $active_property, $val, $options, false); foreach($val as $item) { if(!property_exists($item, '@index')) {