forked from friendica/php-json-ld
Fix blank node check in _flatten.
This commit is contained in:
parent
5149bf383c
commit
a1f83aaba3
|
@ -2365,8 +2365,8 @@ class JsonLdProcessor {
|
||||||
// handle embedded subject or subject reference
|
// handle embedded subject or subject reference
|
||||||
if(self::_isSubject($o) || self::_isSubjectReference($o)) {
|
if(self::_isSubject($o) || self::_isSubjectReference($o)) {
|
||||||
// rename blank node @id
|
// rename blank node @id
|
||||||
$id = property_exists($o, '@id') ? $o->{'@id'} : '_:';
|
$id = property_exists($o, '@id') ? $o->{'@id'} : null;
|
||||||
if(strpos($id, '_:') === 0) {
|
if(self::_isBlankNode($o)) {
|
||||||
$id = $namer->getName($id);
|
$id = $namer->getName($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue