forked from friendica/php-json-ld
Fix type, check for datatype.
This commit is contained in:
parent
7a67ebd0f8
commit
ec6b4d7383
|
@ -2447,7 +2447,7 @@ class JsonLdProcessor {
|
||||||
foreach($keys as $key) {
|
foreach($keys as $key) {
|
||||||
$node = $default_graph->{$key};
|
$node = $default_graph->{$key};
|
||||||
// only add full subjects to top-level
|
// only add full subjects to top-level
|
||||||
if(self::_isSubjectReference($node)) {
|
if(!self::_isSubjectReference($node)) {
|
||||||
$flattened[] = $node;
|
$flattened[] = $node;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3928,7 +3928,8 @@ class JsonLdProcessor {
|
||||||
$t1->object->language !== $t2->object->language) {
|
$t1->object->language !== $t2->object->language) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if($t1->object->datatype !== $t2->object->datatype) {
|
if(property_exists($t1->object, 'datatype') &&
|
||||||
|
$t1->object->datatype !== $t2->object->datatype) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue