I receive the warning after upgrading to PHP 7.2 while running magento still in 2.2. Warning: count(): Parameter must be an array or an object that implements Countable in /vendor/magento/module-catalog/Model/Product/Option/Type/Select.php on line 71
i tried changing count, but i am stuck.
if (!$this->_isSingleSelection()) {
$valuesCollection = $option->getOptionValuesByOptionId($value, $this->getProduct()->getStoreId())->load();
if ($valuesCollection->count() != count($value)) {
$this->setIsValid(false);
throw new LocalizedException(__('Please specify product\'s required option(s).'));
}
}
return $this;
}