diff --git a/jsonld.php b/jsonld.php index 1863eab..3e35f61 100644 --- a/jsonld.php +++ b/jsonld.php @@ -5094,8 +5094,8 @@ class JsonLdProcessor { if(is_array($ctx)) { // add flattened context array_splice($v, $i, 1, $ctx); - $i += count($ctx); - $length += count($ctx); + $i += count($ctx) - 1; + $length = count($v); } else { $v[$i] = $ctx; }