Ignore null values in language maps.

The syntax spec explicitly allows null values in language maps (section 8.5).
This commit is contained in:
Dave Longley 2015-09-14 09:39:23 -04:00
parent 2927e09639
commit eb4b344049

View file

@ -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.',