Skip to content

Commit eff3e1d

Browse files
authored
Update line check is_null $attributes
1 parent c8f78ff commit eff3e1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Catalog/Block/Product/ImageFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ public function __construct(
7676
private function getStringCustomAttributes(array $attributes): string
7777
{
7878
$result = [];
79-
$attributes = (is_null($attributes)) ? [] : $attributes;
8079
foreach ($attributes as $name => $value) {
8180
if ($name != 'class') {
8281
$result[] = $name . '="' . $value . '"';
@@ -161,6 +160,7 @@ public function create(Product $product, string $imageId, array $attributes = nu
161160
);
162161
}
163162

163+
$attributes = (is_null($attributes)) ? [] : $attributes;
164164
$data = [
165165
'data' => [
166166
'template' => 'Magento_Catalog::product/image_with_borders.phtml',

0 commit comments

Comments
 (0)