diff options
author | Julien Rouviere <lezebre@users.sourceforge.net> | 2008-03-18 22:27:54 +0300 |
---|---|---|
committer | Julien Rouviere <lezebre@users.sourceforge.net> | 2008-03-18 22:27:54 +0300 |
commit | 3394154ae7bc1b17fa91d74d49293deeaed0be89 (patch) | |
tree | 3582c7885fd2b774d196aa52f4a83e015f5b6cb7 /modules/ErrorHandler.php | |
parent | 5ba1d864d17fc09b752bad8e505ff00aeabd5fb0 (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
git-svn-id: http://dev.piwik.org/svn/trunk@386 59fd770c-687e-43c8-a1e3-f5a4ff64c105
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; - } + } } |