From eb4b344049809822f8e1dfafc1c25d1a8d55a1f3 Mon Sep 17 00:00:00 2001 From: Dave Longley Date: Mon, 14 Sep 2015 09:39:23 -0400 Subject: [PATCH] Ignore null values in language maps. The syntax spec explicitly allows null values in language maps (section 8.5). --- jsonld.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jsonld.php b/jsonld.php index 7bbe87b..ec7f956 100644 --- a/jsonld.php +++ b/jsonld.php @@ -3216,6 +3216,9 @@ class JsonLdProcessor { $values = $language_map->{$key}; $values = self::arrayify($values); foreach($values as $item) { + if($item === null) { + continue; + } if(!is_string($item)) { throw new JsonLdException( 'Invalid JSON-LD syntax; language map values must be strings.',