Skip to content

Commit

Permalink
Check correct variable for null
Browse files Browse the repository at this point in the history
The wrong variable is being checked for null, which can cause a null reference exception
  • Loading branch information
dennisvanderweide authored Sep 18, 2023
1 parent 412ba39 commit df25e96
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit df25e96

Please sign in to comment.