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 committed Oct 3, 2024
1 parent 8210705 commit d892fff
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 d892fff

Please sign in to comment.