Published: March 16, 2018
Last updated:

Call to undefined method Mage_Log_Helper_Data::isLogFileExtensionValid() in app/Mage.php on line 811

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 with isLogFileExtensionValid() 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).

Posted in: Fatal errors

36 votes, 5.00 avg. rating (99% score)