From b57d0797e83bb60a65527be76b69a04163f4b1aa Mon Sep 17 00:00:00 2001 From: Dave Longley Date: Thu, 28 Feb 2013 16:19:15 -0500 Subject: [PATCH] Allow empty string for @base. --- jsonld.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 {