Question

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

Was it helpful?

Solution

Try this Way..:

if ( count( $cms_tabs )) {
....
}

Add "is_array($cms_tabs) &&" to become:

if (is_array($cms_tabs) && count($cms_tabs) ) {
....
}

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top