Skip to content

Instantly share code, notes, and snippets.

@piotrbelina
Created May 24, 2013 14:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save piotrbelina/10d5544c5fc872ec2a77 to your computer and use it in GitHub Desktop.
Save piotrbelina/10d5544c5fc872ec2a77 to your computer and use it in GitHub Desktop.
<?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