Skip to content

Commit

Permalink
Merge pull request #2470 from mike-esokia/PHRAS-1862_POSTPORT_PHRAS-1844
Browse files Browse the repository at this point in the history
PHRAS-1862 postport PHRAS-1844
  • Loading branch information
nmaillat authored Feb 15, 2018
2 parents c2d4a09 + adb124f commit 939bc13
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,14 @@ public function getRegistryData(FormInterface $form = null, PropertyAccess $conf

private function filterNullValues(array &$array)
{
return array_filter($array, function (&$value) {
foreach ($array as $key => &$value) {
if (is_array($value)) {
$value = $this->filterNullValues($value);
$this->filterNullValues($value);
}

return null !== $value;
});
else if ($key !== 'geonames-server' && $value === null) {
unset($array[$key]);
}
}
return $array;
}
}

0 comments on commit 939bc13

Please sign in to comment.