Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @dennisvanderweide,

Thank you for your contribution!

Please let us know in which scenario the existing will create an issue.

Also please help us with the manual testing scenario.

Thank you

Copy link
Author

@dennisvanderweide dennisvanderweide Sep 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@engcom-Hotel In case $dstSourceItem is null, $dstSourceItemQty will be 0.0 (line 124). If $orgSourceItem is also null it will trigger this if statement. $dstSourceItemQty !== null will be false, because it will be 0.0, but dstSourceItem is still null. $dstSourceItem[SourceItemInterface::STATUS] then gives an error.

I don't know how $orgSourceItem and $dstSourceItem can be both null, both this happend with one of our customers and I saw that this if statement doesn't handle this correctly.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense to me thank you for the clarification.

} elseif ($dstSourceItem !== null) {
$status = (int) $dstSourceItem[SourceItemInterface::STATUS];
} else {
$status = (int) SourceItemInterface::STATUS_OUT_OF_STOCK;
Expand Down