Porto theme product page is not working on php 7.2 / Magento 2
-
14-04-2021 - |
Вопрос
Hello I get the following error on the products pages with PHP 7.2 , Magento 2.33
Exception #0 (Exception): Warning: count(): Parameter must be an array or an object that implements Countable in /chroot/home/ae393a83/xxxxxxxx.com/app/code/Smartwave/Porto/Helper/Customtabs.php on line 74
Thanks Martin
Решение
Try this Way..:
if ( count( $cms_tabs )) {
....
}
Add "
is_array($cms_tabs) &&
" to become:
if (is_array($cms_tabs) && count($cms_tabs) ) {
....
}
Другие советы
I find a solution.
Go to Stores -> Configuration -> Porto -> Porto - Settings Panel -> Product View -> Product Custom Tabs.
In that section I add and delete for Product Custom Static Block Tabs and Product Custom Attribute Tabs. I leave them with 0 rows and saved. Cleared the cache and now works.
Не связан с magento.stackexchange