From d892fff2c424d56684f338619acb6dbfcda400e8 Mon Sep 17 00:00:00 2001 From: dennisvanderweide <32065278+dennisvanderweide@users.noreply.github.com> Date: Mon, 18 Sep 2023 11:02:02 +0200 Subject: [PATCH] Check correct variable for null The wrong variable is being checked for null, which can cause a null reference exception --- InventoryCatalog/Model/ResourceModel/BulkInventoryTransfer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InventoryCatalog/Model/ResourceModel/BulkInventoryTransfer.php b/InventoryCatalog/Model/ResourceModel/BulkInventoryTransfer.php index ecddbe6aca23..30892868bac8 100644 --- a/InventoryCatalog/Model/ResourceModel/BulkInventoryTransfer.php +++ b/InventoryCatalog/Model/ResourceModel/BulkInventoryTransfer.php @@ -127,7 +127,7 @@ private function transferInventory( if ($orgSourceItem !== null) { $status = (int) $orgSourceItem[SourceItemInterface::STATUS]; - } elseif ($dstSourceItemQty !== null) { + } elseif ($dstSourceItem !== null) { $status = (int) $dstSourceItem[SourceItemInterface::STATUS]; } else { $status = (int) SourceItemInterface::STATUS_OUT_OF_STOCK;