Technical resource
Call to undefined method Mage_Log_Helper_Data::isLogFileExtensionValid() in app/Mage.php on line 811
Note: This is a historical reference, not a current security baseline. Magento 1 is end-of-life.
Problem description
The following error is shown or logged after Magento upgrade or patch installation (SUPEE-10415):PHP Fatal error: Call to undefined method Mage_Log_Helper_Data::isLogFileExtensionValid() in app/Mage.php on line 811
Cause
app/Mage.php was updated withisLogFileExtensionValid() function, but there is no such function in app/code/core/Mage/Log/Helper/Data.php or code is cached by Magento Compiler or Opcode Cache.
Ensure that the following code is in app/code/core/Mage/Log/Helper/Data.php (at the very end of file)
public function isLogFileExtensionValid($file)
{
$result = false;
$validatedFileExtension = pathinfo($file, PATHINFO_EXTENSION);
if ($validatedFileExtension && in_array($validatedFileExtension, $this->_allowedFileExtensions)) {
$result = true;
}
return $result;
}
If the code above is there, proceed with the next step. Otherwise ensure that SUPEE-10415 was really applied properly and re-apply it if needed.
Disable Magento Compiler
Clear PHP opcode cache (via corresponding OpCode cache functions, APC, eAccelerator or restart web-server).