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)) { if(is_array($ctx)) {
// add flattened context // add flattened context
array_splice($v, $i, 1, $ctx); array_splice($v, $i, 1, $ctx);
$i += count($ctx); $i += count($ctx) - 1;
$length += count($ctx); $length = count($v);
} else { } else {
$v[$i] = $ctx; $v[$i] = $ctx;
} }