From e5b3248a45ea0c339583f470204ac54c519dfa71 Mon Sep 17 00:00:00 2001 From: zsoltoroszlany82 Date: Wed, 1 Jan 2025 11:01:35 +0100 Subject: [PATCH] check image --- src/catalog/controller/module/ps_live_search.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/catalog/controller/module/ps_live_search.php b/src/catalog/controller/module/ps_live_search.php index f558f41..1338299 100644 --- a/src/catalog/controller/module/ps_live_search.php +++ b/src/catalog/controller/module/ps_live_search.php @@ -119,8 +119,8 @@ public function autocomplete() $tax = false; } - if ($this->config->get('module_ps_live_search_product_image') && is_file(DIR_IMAGE . html_entity_decode($productResult['image'], ENT_QUOTES, 'UTF-8'))) { - $thumb = $this->model_tool_image->resize(html_entity_decode($productResult['image'], ENT_QUOTES, 'UTF-8'), $this->config->get('module_ps_live_search_product_image_width'), $this->config->get('module_ps_live_search_product_image_height')); + if ($this->config->get('module_ps_live_search_product_image') && !empty($productResult['image'])) { + $thumb = $this->model_tool_image->resize($productResult['image'], $this->config->get('module_ps_live_search_product_image_width'), $this->config->get('module_ps_live_search_product_image_height')); } else { $thumb = ''; }