From fb599b3feefe3616092df67d53eed0f85a874447 Mon Sep 17 00:00:00 2001 From: Sergey Tolkachyov Date: Sun, 23 Oct 2022 17:05:17 +0400 Subject: [PATCH] v.1.1.5 PHP 8 warning bug fix --- ...GB.plg_jshoppingproducts_wt_jshopping_schema_org.sys.ini | 2 +- ...RU.plg_jshoppingproducts_wt_jshopping_schema_org.sys.ini | 2 +- wt_jshopping_schema_org.php | 6 +++--- wt_jshopping_schema_org.xml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/language/en-GB/en-GB.plg_jshoppingproducts_wt_jshopping_schema_org.sys.ini b/language/en-GB/en-GB.plg_jshoppingproducts_wt_jshopping_schema_org.sys.ini index 17b564f..7565d1e 100644 --- a/language/en-GB/en-GB.plg_jshoppingproducts_wt_jshopping_schema_org.sys.ini +++ b/language/en-GB/en-GB.plg_jshoppingproducts_wt_jshopping_schema_org.sys.ini @@ -4,4 +4,4 @@ PLG_WT_JSHOPPING_SCHEMA_ORG_AFTER_INSTALL = "Thank you for intalling extension" PLG_WT_JSHOPPING_SCHEMA_ORG_AFTER_DISCOVER_INSTALL = "Thank you for intalling extension" PLG_WT_JSHOPPING_SCHEMA_ORG_AFTER_UPDATE = "Thank you for updating extension" PLG_WT_JSHOPPING_SCHEMA_ORG_MAYBE_INTERESTING="

It might be interesting

" -PLG_WT_JSHOPPING_SCHEMA_ORG_WHATS_NEW="

v.1.1.4 What's new?

" \ No newline at end of file +PLG_WT_JSHOPPING_SCHEMA_ORG_WHATS_NEW="

v.1.1.5 What's new?

PHP 8 warning bug fix.

" \ No newline at end of file diff --git a/language/ru-RU/ru-RU.plg_jshoppingproducts_wt_jshopping_schema_org.sys.ini b/language/ru-RU/ru-RU.plg_jshoppingproducts_wt_jshopping_schema_org.sys.ini index b574b2d..89af8fb 100644 --- a/language/ru-RU/ru-RU.plg_jshoppingproducts_wt_jshopping_schema_org.sys.ini +++ b/language/ru-RU/ru-RU.plg_jshoppingproducts_wt_jshopping_schema_org.sys.ini @@ -4,4 +4,4 @@ PLG_WT_JSHOPPING_SCHEMA_ORG_AFTER_INSTALL = "Спасибо за установ PLG_WT_JSHOPPING_SCHEMA_ORG_AFTER_DISCOVER_INSTALL = "Спасибо за установку расширения" PLG_WT_JSHOPPING_SCHEMA_ORG_AFTER_UPDATE = "Спасибо за обновление расширения" PLG_WT_JSHOPPING_SCHEMA_ORG_MAYBE_INTERESTING="

Может быть интересно

" -PLG_WT_JSHOPPING_SCHEMA_ORG_WHATS_NEW="

v.1.1.4 Что нового?

" \ No newline at end of file +PLG_WT_JSHOPPING_SCHEMA_ORG_WHATS_NEW="

v.1.1.5 Что нового?

Исправление предупреждений PHP 8

" \ No newline at end of file diff --git a/wt_jshopping_schema_org.php b/wt_jshopping_schema_org.php index 770ede3..af8daf2 100644 --- a/wt_jshopping_schema_org.php +++ b/wt_jshopping_schema_org.php @@ -245,7 +245,7 @@ public function onBeforeDisplayProductListView($view, &$productlist) } // Добавляем товары - if (count($productlist->products) > 0) + if (isset($productlist->products) && count($productlist->products) > 0) { $product_description = $this->params->get('product_desc_is', 'short_description'); foreach ($productlist->products as $product) @@ -391,7 +391,7 @@ public function onBeforeDisplayCategoryView($view) } // Добавляем вложенные категории - if (count($view->categories) > 0) + if (isset($view->categories) && count($view->categories) > 0) { foreach ($view->categories as $category) @@ -459,7 +459,7 @@ public function onBeforeDisplayManufacturerView($view) } // Добавляем вложенные категории - if (count($view->rows) > 0) + if (isset($view->rows) && count($view->rows) > 0) { foreach ($view->rows as $manufacturer) diff --git a/wt_jshopping_schema_org.xml b/wt_jshopping_schema_org.xml index fc68a55..cbe3869 100644 --- a/wt_jshopping_schema_org.xml +++ b/wt_jshopping_schema_org.xml @@ -2,12 +2,12 @@ PLG_WT_JSHOPPING_SCHEMA_ORG Sergey Tolkachyov - 17/09/2022 + 23/10/2022 (c) 2022 Sergey Tolkachyov GNU General Public License version 3 or later info@web-tolk.ru https://web-tolk.ru - 1.1.4 + 1.1.5 PLG_WT_JSHOPPING_SCHEMA_ORG_DESC script.php