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.

许可以下: CC-BY-SA归因
scroll top