Fix issues with is_null

This commit is contained in:
James Brooks
2015-11-21 22:01:13 +00:00
parent bf88dfced0
commit 27f1e6b8a4
4 changed files with 24 additions and 8 deletions

View File

@@ -42,7 +42,7 @@ class AddComponentCommandHandler
*/
protected function filter(AddComponentCommand $command)
{
return array_filter([
$params = [
'name' => $command->name,
'description' => $command->description,
'link' => $command->link,
@@ -50,6 +50,10 @@ class AddComponentCommandHandler
'enabled' => $command->enabled,
'order' => $command->order,
'group_id' => $command->group_id,
], 'is_null');
];
return array_filter($params, function ($val) {
return $val !== null;
});
}
}