Skip to content

Commit 7cb33b0

Browse files
committed
MC-36250: Variable might not be defined
1 parent 7e15dc0 commit 7cb33b0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/code/Magento/Wishlist/Model/Wishlist.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,7 @@ public function addNewItem($product, $buyRequest = null, $forciblySetQty = false
475475
$_buyRequest = $buyRequest;
476476
} elseif (is_string($buyRequest)) {
477477
$isInvalidItemConfiguration = false;
478+
$buyRequestData = [];
478479
try {
479480
$buyRequestData = $this->serializer->unserialize($buyRequest);
480481
if (!is_array($buyRequestData)) {
@@ -515,6 +516,7 @@ public function addNewItem($product, $buyRequest = null, $forciblySetQty = false
515516

516517
$errors = [];
517518
$items = [];
519+
$item = null;
518520

519521
foreach ($cartCandidates as $candidate) {
520522
if ($candidate->getParentProductId()) {

0 commit comments

Comments
 (0)