|
From: FlorinCB <ory...@us...> - 2008-09-30 07:06:33
|
Update of /cvsroot/mxbb/core/modules/mx_shared/ErrorHandler In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26368/modules/mx_shared/ErrorHandler Modified Files: Handler.php error.tpl Log Message: rewrite for php4 and php6 issues Index: error.tpl =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_shared/ErrorHandler/error.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** error.tpl 5 Apr 2006 21:05:28 -0000 1.1 --- error.tpl 30 Sep 2008 07:04:53 -0000 1.2 *************** *** 1,4 **** <?php ! $showSourceUri = 'http://localhost/modules/ErrorHandler/showSource.php'; $showSourcePrev = 10; $showSourceNext = 10; --- 1,4 ---- <?php ! $showSourceUri = 'http://localhost/modules/mx_shared/ErrorHandler/showSource.php'; $showSourcePrev = 10; $showSourceNext = 10; Index: Handler.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_shared/ErrorHandler/Handler.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Handler.php 6 Aug 2007 21:11:57 -0000 1.3 --- Handler.php 30 Sep 2008 07:04:53 -0000 1.4 *************** *** 14,18 **** * @package ErrorHandler */ ! class ErrorHandler { /** --- 14,19 ---- * @package ErrorHandler */ ! class ErrorHandler ! { /** *************** *** 20,24 **** * @access public */ ! function ErrorHandler() { @ini_set('docref_root', null); @ini_set('docref_ext', null); --- 21,26 ---- * @access public */ ! function ErrorHandler() ! { @ini_set('docref_root', null); @ini_set('docref_ext', null); *************** *** 33,48 **** * @access public */ ! function raiseError($errNo, $errMsg, $file, $line) { global $mx_user; ! if (! ($errNo & error_reporting())) { return; } ! while (ob_get_level()) { ob_end_clean(); } ! ! $errType = array ( 1 => "Php Error", 2 => "Php Warning", --- 35,55 ---- * @access public */ ! function raiseError($errNo, $errMsg, $file, $line) ! { global $mx_user; ! if ( !($errNo & error_reporting())) ! { return; } ! while (ob_get_level()) ! { ob_end_clean(); } ! ! // figure out the error level ! $errType = array( ! 0 => "Unknown PHP Error", 1 => "Php Error", 2 => "Php Warning", *************** *** 55,65 **** 256 => "Php User Error", 512 => "Php User Warning", ! 1024 => "Php User Notice" ); ! $info = array(); ! if (($errNo & E_USER_ERROR) && is_array($arr = @unserialize($errMsg))) { ! foreach ($arr as $k => $v) { $info[$k] = $v; } --- 62,75 ---- 256 => "Php User Error", 512 => "Php User Warning", ! 1024 => "Php User Notice", ! 2048 => 'PHP Strict', ); ! $info = array(); ! if (($errNo & E_USER_ERROR) && is_array($arr = @unserialize($errMsg))) ! { ! foreach ($arr as $k => $v) ! { $info[$k] = $v; } *************** *** 68,72 **** $trace = array(); ! if (function_exists('debug_backtrace')) { $trace = debug_backtrace(); array_shift($trace); --- 78,83 ---- $trace = array(); ! if (function_exists('debug_backtrace')) ! { $trace = debug_backtrace(); array_shift($trace); |