Skip to content

Uncaught Exception: Deprecated Functionality: Return type of MageplazaLayeredNavigationModelLayerFilterCategoryItem

when i install Porto Theme ,
php -f bin/magento setup:di:compile

Fatal error:  During inheritance of Countable: Uncaught Exception: Deprecated Functionality: Return type of MageplazaLayeredNavigationModelLayerFilterCategoryItem::count() should either be compatible with Countable::count(): int, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /data/wwwroot/ www.com/app/code/Mageplaza/LayeredNavigation/Model/Layer/Filter/CategoryItem.php on line 136 in /data/wwwroot/www.com/vendor/magento/framework/App/ErrorHandler.php:61