From 3f901e299fc123d2f07d6a16b806fc93d7175bec Mon Sep 17 00:00:00 2001 From: Alex Gusev Date: Fri, 19 Aug 2016 17:46:20 +0300 Subject: [PATCH] Return the same data on exit Function `correctItemsQty` returns $this in case of input argument `$items` is empty or nothing otherwise. I suppose return value should be the same in the both cases - $this or nothing. --- app/code/Magento/CatalogInventory/Model/ResourceModel/Stock.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock.php b/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock.php index 17a3e0c9a9949..28b306ff68805 100644 --- a/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock.php +++ b/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock.php @@ -140,7 +140,7 @@ public function lockProductsStock($productIds, $websiteId) public function correctItemsQty(array $items, $websiteId, $operator) { if (empty($items)) { - return $this; + return; } $connection = $this->getConnection();