forked from friendica/php-json-ld
Move container var outside of loop.
This commit is contained in:
parent
7692f6f087
commit
6e2b78c722
16
jsonld.php
16
jsonld.php
|
@ -4601,6 +4601,14 @@ class JsonLdProcessor {
|
|||
continue;
|
||||
}
|
||||
|
||||
// add term selection where it applies
|
||||
if(property_exists($mapping, '@container')) {
|
||||
$container = $mapping->{'@container'};
|
||||
}
|
||||
else {
|
||||
$container = '@none';
|
||||
}
|
||||
|
||||
// iterate over every IRI in the mapping
|
||||
$iris = $mapping->{'@id'};
|
||||
$iris = self::arrayify($iris);
|
||||
|
@ -4611,14 +4619,6 @@ class JsonLdProcessor {
|
|||
}
|
||||
$container_map = $inverse->{$iri};
|
||||
|
||||
// add term selection where it applies
|
||||
if(property_exists($mapping, '@container')) {
|
||||
$container = $mapping->{'@container'};
|
||||
}
|
||||
else {
|
||||
$container = '@none';
|
||||
}
|
||||
|
||||
// add new entry
|
||||
if(!property_exists($container_map, $container)) {
|
||||
$container_map->{$container} = (object)array(
|
||||
|
|
Loading…
Reference in a new issue