Skip to content

Commit

Permalink
improve array filter
Browse files Browse the repository at this point in the history
  • Loading branch information
engcom-Charlie committed Sep 7, 2020
1 parent 0ac2e5d commit edd3401
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/code/Magento/Widget/Model/Widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ public function getWidgetDeclaration($type, $params = [], $asIs = true)
$widget = $this->getConfigAsObject($type);

$params = array_filter($params, function ($value) {
return $value !== null;
return $value !== null && $value !== '';
});

$directiveParams = '';
Expand Down

0 comments on commit edd3401

Please sign in to comment.