Skip to content

Commit f0f61b7

Browse files
committed
Fix "each()" function call on potentially invalid data
1 parent e3c955c commit f0f61b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ public function getAttributeRawValue($entityId, $attribute, $store)
563563
}
564564
}
565565

566-
if (sizeof($attributesData) == 1) {
566+
if (is_array($attributesData) && sizeof($attributesData) == 1) {
567567
$_data = each($attributesData);
568568
$attributesData = $_data[1];
569569
}

0 commit comments

Comments
 (0)