Skip to content

Commit eb4b344

Browse files
committed
Ignore null values in language maps.
The syntax spec explicitly allows null values in language maps (section 8.5).
1 parent 2927e09 commit eb4b344

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

jsonld.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3216,6 +3216,9 @@ protected function _expandLanguageMap($language_map) {
32163216
$values = $language_map->{$key};
32173217
$values = self::arrayify($values);
32183218
foreach($values as $item) {
3219+
if($item === null) {
3220+
continue;
3221+
}
32193222
if(!is_string($item)) {
32203223
throw new JsonLdException(
32213224
'Invalid JSON-LD syntax; language map values must be strings.',

0 commit comments

Comments
 (0)