Ignore null values in language maps.
The syntax spec explicitly allows null values in language maps (section 8.5).
This commit is contained in:
parent
2927e09639
commit
eb4b344049
|
@ -3216,6 +3216,9 @@ class JsonLdProcessor {
|
||||||
$values = $language_map->{$key};
|
$values = $language_map->{$key};
|
||||||
$values = self::arrayify($values);
|
$values = self::arrayify($values);
|
||||||
foreach($values as $item) {
|
foreach($values as $item) {
|
||||||
|
if($item === null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if(!is_string($item)) {
|
if(!is_string($item)) {
|
||||||
throw new JsonLdException(
|
throw new JsonLdException(
|
||||||
'Invalid JSON-LD syntax; language map values must be strings.',
|
'Invalid JSON-LD syntax; language map values must be strings.',
|
||||||
|
|
Loading…
Reference in a new issue