I have this code:
public function getCounter()
{
/** @var \Amasty\ShopbyPage\Model\Page $model */
$model = $this->_coreRegistry->registry(RegistryConstants::PAGE);
return count($model->getConditions());
}
But in line:
return count($model->getConditions());
I get error in php 7.2:
Warning: count(): Parameter must be an array or an object that implements Countable
Magento 2.3 version. PHP7.2
In php 7.1 works fine. How can I fix it?