Fix blank node check in _flatten.

This commit is contained in:
Dave Longley 2012-05-21 15:51:17 -04:00
parent 5149bf383c
commit a1f83aaba3

View file

@ -2365,8 +2365,8 @@ class JsonLdProcessor {
// handle embedded subject or subject reference
if(self::_isSubject($o) || self::_isSubjectReference($o)) {
// rename blank node @id
$id = property_exists($o, '@id') ? $o->{'@id'} : '_:';
if(strpos($id, '_:') === 0) {
$id = property_exists($o, '@id') ? $o->{'@id'} : null;
if(self::_isBlankNode($o)) {
$id = $namer->getName($id);
}