From dd369c69d0ef6b7cce2b7a9a5c44ba8b313b36f0 Mon Sep 17 00:00:00 2001 From: Dave Longley Date: Wed, 3 Apr 2013 16:31:48 -0400 Subject: [PATCH] Fix error text and details. --- jsonld.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/jsonld.php b/jsonld.php index ee93f62..7e4b000 100644 --- a/jsonld.php +++ b/jsonld.php @@ -4280,7 +4280,7 @@ class JsonLdProcessor { $preserve_index = (property_exists($value, '@index') && $container !== '@index'); - // if there's no @index to preserve ... + // if there's no @index to preserve if(!$preserve_index) { // matching @type or @language specified in context, compact value if(self::_hasKeyValue($value, '@type', $type) || @@ -4411,7 +4411,7 @@ class JsonLdProcessor { if($value === '@context' || $value === '@preserve') { throw new JsonLdException( 'Invalid JSON-LD syntax; @context and @preserve cannot be aliased.', - 'jsonld.SyntaxError'); + 'jsonld.SyntaxError', array('context' => $local_ctx)); } } @@ -4460,8 +4460,7 @@ class JsonLdProcessor { $id = $value->{'@id'}; if(!is_string($id)) { throw new JsonLdException( - 'Invalid JSON-LD syntax; @context @id value must be an array ' . - 'of strings or a string.', + 'Invalid JSON-LD syntax; @context @id value must be a string.', 'jsonld.SyntaxError', array('context' => $local_ctx)); } // add @id to mapping