Skip to content

Commit

Permalink
change empty/null value handling
Browse files Browse the repository at this point in the history
  • Loading branch information
nadar committed Nov 15, 2018
1 parent daaaa2a commit 2b6c3a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/web/jsonld/BaseThing.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ private function removeEmptyValues(array $haystack)
if (is_array($value)) {
$haystack[$key] = $this->removeEmptyValues($value);
}
// remove empty values as there is no property which allows empty values.
if (empty($value)) {
// remove empty values value value is NULL or an empty string ''
if ($value === null || $value == '') {
unset($haystack[$key]);
}
}
Expand Down

0 comments on commit 2b6c3a7

Please sign in to comment.