forked from friendica/php-json-ld
Fix off-by-one in context merging.
This commit is contained in:
parent
f252a5281c
commit
daed05a54b
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue