diff options
author | julien <julien@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2008-03-18 22:27:54 +0300 |
---|---|---|
committer | julien <julien@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2008-03-18 22:27:54 +0300 |
commit | 55d8a3ad0bcb68a5c0da0c0b81c873d3d317b41e (patch) | |
tree | 3582c7885fd2b774d196aa52f4a83e015f5b6cb7 /modules/ErrorHandler.php | |
parent | 29a8e2bbb4ba99657395ef51d7adedde77847fc1 (diff) |
Commited some very good patch by Maciej ZawadziĆski :
-fix #106, #112 : Admin index and menu
-fix #88 : nice login screen
-fix #105 : nice plugin admin management,
-fix #40 : outlink/download tracking, solves bugs and adds some options
+Some code cleanup regarding new coding standard
Diffstat (limited to 'modules/ErrorHandler.php')
-rwxr-xr-x | modules/ErrorHandler.php | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/modules/ErrorHandler.php b/modules/ErrorHandler.php index d8b52f060d..8643720a18 100755 --- a/modules/ErrorHandler.php +++ b/modules/ErrorHandler.php @@ -17,25 +17,25 @@ require_once "Zend/Registry.php"; function Piwik_ErrorHandler($errno, $errstr, $errfile, $errline) { - // if the error has been suppressed by the @ we don't handle the error - if( error_reporting() == 0 ) - { - return; - } + // if the error has been suppressed by the @ we don't handle the error + if( error_reporting() == 0 ) + { + return; + } + + ob_start(); + debug_print_backtrace(); + $backtrace = ob_get_contents(); + ob_end_clean(); + - ob_start(); - debug_print_backtrace(); - $backtrace = ob_get_contents(); - ob_end_clean(); - - - try { - Zend_Registry::get('logger_error')->log($errno, $errstr, $errfile, $errline, $backtrace); - }catch(Exception $e){ - // in case the error occurs before the logger creation, we simply display it - print("<pre>$errstr \nin '$errfile' at the line $errline\n\n$backtrace\n</pre>"); - exit; - } + try { + Zend_Registry::get('logger_error')->log($errno, $errstr, $errfile, $errline, $backtrace); + }catch(Exception $e){ + // in case the error occurs before the logger creation, we simply display it + print("<pre>$errstr \nin '$errfile' at the line $errline\n\n$backtrace\n</pre>"); + exit; + } switch($errno) { case E_ERROR: @@ -58,6 +58,6 @@ function Piwik_ErrorHandler($errno, $errstr, $errfile, $errline) default: // do not exit break; - } + } } |