From ebd3de3837b3f012aed9547d78851f965ad7b0db Mon Sep 17 00:00:00 2001 From: Johan Lindahl Date: Wed, 17 Feb 2021 22:18:08 +0100 Subject: [PATCH] Prevent Type Error PHP exception for numeric SKU --- .../Model/Queue/UpdateIndexSalabilityStatus/IndexProcessor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InventoryIndexer/Model/Queue/UpdateIndexSalabilityStatus/IndexProcessor.php b/InventoryIndexer/Model/Queue/UpdateIndexSalabilityStatus/IndexProcessor.php index cebf1e8cdac9..aac82dbd99e0 100644 --- a/InventoryIndexer/Model/Queue/UpdateIndexSalabilityStatus/IndexProcessor.php +++ b/InventoryIndexer/Model/Queue/UpdateIndexSalabilityStatus/IndexProcessor.php @@ -116,7 +116,7 @@ private function getDataForUpdate(array $salabilityData, int $stockId): array { $data = []; foreach ($salabilityData as $sku => $isSalable) { - $currentStatus = $this->getIndexSalabilityStatus($sku, $stockId); + $currentStatus = $this->getIndexSalabilityStatus((string)$sku, $stockId); if ($isSalable != $currentStatus && $currentStatus !== null) { $data[$sku] = $isSalable; }