Skip to content

Commit 6b2117d

Browse files
author
Oleksandr Dubovyk
committed
MAGETWO-66067: Remove usages of unserialize in module Magento/Wishlist
- Changed variables to private
1 parent d317e13 commit 6b2117d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/code/Magento/Wishlist/Controller/Index/DownloadCustomOption.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class DownloadCustomOption extends \Magento\Wishlist\Controller\AbstractIndex
2323
*
2424
* @var Json
2525
*/
26-
protected $json;
26+
private $json;
2727

2828
/**
2929
* @param Action\Context $context

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class Wishlist extends \Magento\Framework\Model\AbstractModel implements \Magent
125125
*
126126
* @var Json
127127
*/
128-
protected $serializer;
128+
private $serializer;
129129

130130
/**
131131
* @param \Magento\Framework\Model\Context $context
@@ -415,7 +415,7 @@ public function addNewItem($product, $buyRequest = null, $forciblySetQty = false
415415
if ($buyRequest instanceof \Magento\Framework\DataObject) {
416416
$_buyRequest = $buyRequest;
417417
} elseif (is_string($buyRequest)) {
418-
$_buyRequest = new \Magento\Framework\DataObject($this->serializer->unserialize($buyRequest));
418+
$_buyRequest = new \Magento\Framework\DataObject($this->serializer->unserialize($buyRequest));
419419
} elseif (is_array($buyRequest)) {
420420
$_buyRequest = new \Magento\Framework\DataObject($buyRequest);
421421
} else {

0 commit comments

Comments
 (0)