Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
class Mage_Core_Model_App
{
// ...
/**
* Redeclare custom error handler
*
* @param string $handler
* @return Mage_Core_Model_App
*/
public function setErrorHandler($handler)
{
if (!Mage::getIsDeveloperMode()) {
set_error_handler($handler);
} else {
require_once __DIR__ . '/../../../../../../lib/PHP-Error/php_error.php';
\php_error\reportErrors();
}
return $this;
}
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment