while creating the new products its throwing below error
“Warning: Invalid argument supplied for foreach() in home/……/public_html/vendor/magento/module-media-storage/Model/File/Validator/NotProtectedExtension.php on line 84”
same issue with import option also.
protected function _initProtectedFileExtensions()
{
if (!$this->_protectedFileExtensions) {
$extensions = $this->getProtectedFileExtensions();
if (is_string($extensions)) {
$extensions = explode(',', $extensions);
}
foreach ($extensions as &$ext) {
$ext = strtolower(trim($ext));
}
$this->_protectedFileExtensions = (array)$extensions;
}
return $this;
}
Does anyone have idea about this issue?