diff --git a/jsonld.php b/jsonld.php index 47a2c35..07476ac 100644 --- a/jsonld.php +++ b/jsonld.php @@ -1,7 +1,7 @@ {'@base'}; if($base === null) { - $rval->{'@base'} = jsonld_parse_url($options['base']); + $base = $options['base']; } else if(!is_string($base)) { throw new JsonLdException( @@ -2659,9 +2659,7 @@ class JsonLdProcessor { '@context must be an absolute IRI or the empty string.', 'jsonld.SyntaxError', array('context' => $ctx)); } - else { - $rval->{'@base'} = $base; - } + $rval->{'@base'} = jsonld_parse_url($base); $defined->{'@base'} = true; }