When I upload a product image the file uploads fine but on completion magento then shows this error:
Warning: Invalid argument supplied for foreach() in ..../app/code/core/Mage/Core/Model/File/Validator/NotProtectedExtension.php on line 91
I have checked that there the protected_extensions node is present in
app/code/core/Mage/Core/etc/config.xml
And also I have grepped for protected_extensions across the whole site so I know this is not being interfered with elsewhere.
This link : http://www.codegithub.com/watch?v=CBN6qgxxgUxX suggested that the presence of a null value for the
path => 'general', value => NULL
in the core_config_data
table stops something working but deleting this didn't help. It doesn't suggest further actions and I don't understand how to investigate that further.
Can anyone advise ways to resolve where this problem has come from. The site was working fine until recently and can't identify any changes we have made that would have this affect.
UPDATE: Have tried disabling all extensions but that doesn't help, can anyone point me to where I can get more understanding of this aspect of the system I am bogged down in terms of understanding how this is happening.
UPDATE2: SQL query suggested below does return no records as suggested. config.xml is also as it should appear.
var_dump(Mage::helper('core')->getProtectedFileExtensions());
returns null not array so to get the site working I have hacked the validator function to check for an array but this has effectively disabled the protected files function so I need to resolve this in the long term.
this is defined as the constant in getProtectedfileExtensions:
const XML_PATH_PROTECTED_FILE_EXTENSIONS= 'general/file/protected_extensions';
and
Mage::getStoreConfig(self::XML_PATH_PROTECTED_FILE_EXTENSIONS, $store);
returns null not any kind of array.
In desperation I even tried changing config.xml to 775 just in case there was some permissions issue.
I feel like I am missing some piece of understanding about magento config, anyone suggest the next step?