diff --git a/jsonld.php b/jsonld.php index fb28231..55e0306 100644 --- a/jsonld.php +++ b/jsonld.php @@ -1,7 +1,7 @@ $ctx)); } - else if(!self::_isAbsoluteIri($base)) { + else if($base !== '' && !self::_isAbsoluteIri($base)) { throw new JsonLdException( 'Invalid JSON-LD syntax; the value of "@base" in a ' . - '@context must be an absolute IRI.', + '@context must be an absolute IRI or the empty string.', 'jsonld.SyntaxError', array('context' => $ctx)); } else {