Issue 5859: Avoid returning empty arrays

This commit is contained in:
Michael 2018-10-10 19:15:16 +00:00
parent 5f9dd11cfb
commit c4da138eee

View file

@ -128,7 +128,7 @@ class JsonLD
$elements[] = $entry; $elements[] = $entry;
} elseif (!empty($entry[$key])) { } elseif (!empty($entry[$key])) {
$elements[] = $entry[$key]; $elements[] = $entry[$key];
} else { } elseif (!empty($entry) || !is_array($entry)) {
$elements[] = $entry; $elements[] = $entry;
} }
} }