Skip to content

Commit edd3401

Browse files
improve array filter
1 parent 0ac2e5d commit edd3401

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Widget/Model/Widget.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ public function getWidgetDeclaration($type, $params = [], $asIs = true)
311311
$widget = $this->getConfigAsObject($type);
312312

313313
$params = array_filter($params, function ($value) {
314-
return $value !== null;
314+
return $value !== null && $value !== '';
315315
});
316316

317317
$directiveParams = '';

0 commit comments

Comments
 (0)