Fix off-by-one in context merging.

This commit is contained in:
Dave Longley 2014-12-03 14:56:23 -05:00
parent f252a5281c
commit daed05a54b

View file

@ -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;
}