Skip to content

Commit 529c46f

Browse files
committed
Error in vendor/magento/module-shipping/Model/Config/Source/Allmethods.php - public function toOptionArray
1 parent 68d2137 commit 529c46f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/code/Magento/Shipping/Model/Config/Source/Allmethods.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ public function toOptionArray($isActiveOnlyFlag = false)
5656
);
5757
$methods[$carrierCode] = ['label' => $carrierTitle, 'value' => []];
5858
foreach ($carrierMethods as $methodCode => $methodTitle) {
59+
60+
/** Check it $carrierMethods array was well formed */
61+
if (!$methodCode) {
62+
continue;
63+
}
5964
$methods[$carrierCode]['value'][] = [
6065
'value' => $carrierCode . '_' . $methodCode,
6166
'label' => '[' . $carrierCode . '] ' . $methodTitle,

0 commit comments

Comments
 (0)