From ec664bb37f842b8b542b7c266dfa237b40d9ad51 Mon Sep 17 00:00:00 2001 From: Vincent Marmiesse Date: Fri, 19 Feb 2021 16:12:21 +0100 Subject: [PATCH] Fix infinite loop if no products models are found in Akeneo --- app/code/community/Pimgento/Api/Model/Job/Product/Model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/community/Pimgento/Api/Model/Job/Product/Model.php b/app/code/community/Pimgento/Api/Model/Job/Product/Model.php index ae7a973..3243d74 100644 --- a/app/code/community/Pimgento/Api/Model/Job/Product/Model.php +++ b/app/code/community/Pimgento/Api/Model/Job/Product/Model.php @@ -92,7 +92,7 @@ public function createTable($task) $productModelCollection = $client->getProductModelApi()->listPerPage(1); /** @var Pimgento_Api_Helper_Data $helper */ $helper = $this->getHelper(); - if ($productModelCollection->getCount() === 0) { + if (!$productModelCollection->getCount()) { $task->stop($helper->__('No results retrieved from Akeneo')); } /** @var mixed[] $productModelItems */