From: <var...@us...> - 2009-04-01 13:22:23
|
Revision: 6760 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6760&view=rev Author: vargenau Date: 2009-04-01 12:48:10 +0000 (Wed, 01 Apr 2009) Log Message: ----------- Be more verbose if DEBUG is on Modified Paths: -------------- trunk/lib/ErrorManager.php Modified: trunk/lib/ErrorManager.php =================================================================== --- trunk/lib/ErrorManager.php 2009-04-01 12:45:21 UTC (rev 6759) +++ trunk/lib/ErrorManager.php 2009-04-01 12:48:10 UTC (rev 6760) @@ -362,16 +362,17 @@ * * @access private */ -function ErrorManager_errorHandler($errno, $errstr, $errfile, $errline) +function ErrorManager_errorHandler($errno, $errstr, $errfile, $errline) { if (!isset($GLOBALS['ErrorManager'])) { $GLOBALS['ErrorManager'] = new ErrorManager; } - - if (defined('DEBUG') and DEBUG) - $error = new PhpWikiError($errno, $errstr, $errfile, $errline); - else - $error = new PhpErrorOnce($errno, $errstr, $errfile, $errline); + + if (defined('DEBUG') and DEBUG) { + $error = new PhpError($errno, $errstr, $errfile, $errline); + } else { + $error = new PhpErrorOnce($errno, $errstr, $errfile, $errline); + } $GLOBALS['ErrorManager']->handleError($error); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2009-10-05 12:56:15
|
Revision: 7180 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7180&view=rev Author: vargenau Date: 2009-10-05 12:56:05 +0000 (Mon, 05 Oct 2009) Log Message: ----------- Valid XHTML code; add CSS Modified Paths: -------------- trunk/lib/ErrorManager.php Modified: trunk/lib/ErrorManager.php =================================================================== --- trunk/lib/ErrorManager.php 2009-10-05 11:58:38 UTC (rev 7179) +++ trunk/lib/ErrorManager.php 2009-10-05 12:56:05 UTC (rev 7180) @@ -260,9 +260,20 @@ // Handle it ourself. if ($error->isFatal()) { $this->_noCacheHeaders(); - echo "<html><body><div style=\"font-weight:bold; color:red\">Fatal Error:</div>\n"; + echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; + echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n"; + echo "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"; + echo "<html>\n"; + echo "<head>\n"; + echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n"; + echo "<title>Fatal Error</title>\n"; + echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"themes/default/phpwiki.css\" />\n"; + echo "</head>\n"; + echo "<body>\n"; + echo "<div style=\"font-weight:bold; color:red\">Fatal Error:</div>\n"; + if (defined('DEBUG') and (DEBUG & _DEBUG_TRACE)) { - echo "error_reporting=",error_reporting(),"\n<br>"; + echo "error_reporting=",error_reporting(),"\n<br />"; if (function_exists("debug_backtrace")) // >= 4.3.0 $error->printSimpleTrace(debug_backtrace()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ru...@us...> - 2010-06-07 10:37:39
|
Revision: 7471 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7471&view=rev Author: rurban Date: 2010-06-07 10:37:33 +0000 (Mon, 07 Jun 2010) Log Message: ----------- use special HtmlElement5.php with php-4 unparsable public static declaration Modified Paths: -------------- trunk/lib/ErrorManager.php Modified: trunk/lib/ErrorManager.php =================================================================== --- trunk/lib/ErrorManager.php 2010-06-07 10:36:03 UTC (rev 7470) +++ trunk/lib/ErrorManager.php 2010-06-07 10:37:33 UTC (rev 7471) @@ -649,7 +649,11 @@ } } -require_once(dirname(__FILE__).'/HtmlElement.php'); +if (check_php_version(5,2)) { + require_once(dirname(__FILE__).'/HtmlElement5.php'); +} else { + require_once(dirname(__FILE__).'/HtmlElement.php'); +} if (!isset($GLOBALS['ErrorManager'])) { $GLOBALS['ErrorManager'] = new ErrorManager; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2010-12-20 12:47:13
|
Revision: 7788 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7788&view=rev Author: vargenau Date: 2010-12-20 12:47:06 +0000 (Mon, 20 Dec 2010) Log Message: ----------- No h4 for errors Modified Paths: -------------- trunk/lib/ErrorManager.php Modified: trunk/lib/ErrorManager.php =================================================================== --- trunk/lib/ErrorManager.php 2010-12-20 12:37:25 UTC (rev 7787) +++ trunk/lib/ErrorManager.php 2010-12-20 12:47:06 UTC (rev 7788) @@ -130,8 +130,8 @@ if ($worst_err->isNotice()) return $flushed; $class = $worst_err->getHtmlClass(); - $html = HTML::div(array('style' => 'border: none', 'class' => $class), - HTML::h4(array('class' => 'errors'), + $html = HTML::div(array('class' => $class), + HTML::div(array('class' => 'errors'), "PHP " . $worst_err->getDescription())); $html->pushContent($flushed); return $html; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2012-11-14 16:42:52
|
Revision: 8452 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8452&view=rev Author: vargenau Date: 2012-11-14 16:42:43 +0000 (Wed, 14 Nov 2012) Log Message: ----------- elseif Modified Paths: -------------- trunk/lib/ErrorManager.php Modified: trunk/lib/ErrorManager.php =================================================================== --- trunk/lib/ErrorManager.php 2012-11-14 16:41:08 UTC (rev 8451) +++ trunk/lib/ErrorManager.php 2012-11-14 16:42:43 UTC (rev 8452) @@ -286,7 +286,7 @@ $error->printSimpleTrace(debug_backtrace()); } $this->_die($error); - } else if (($error->errno & error_reporting()) != 0) { + } elseif (($error->errno & error_reporting()) != 0) { if (($error->errno & $this->_postpone_mask) != 0) { if ((function_exists('isa') and isa($error, 'PhpErrorOnce')) or (!function_exists('isa') and This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2012-11-21 10:15:33
|
Revision: 8506 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8506&view=rev Author: vargenau Date: 2012-11-21 10:15:22 +0000 (Wed, 21 Nov 2012) Log Message: ----------- Temporary hack to have errors displayed on dev machines. Modified Paths: -------------- trunk/lib/ErrorManager.php Modified: trunk/lib/ErrorManager.php =================================================================== --- trunk/lib/ErrorManager.php 2012-11-20 20:51:46 UTC (rev 8505) +++ trunk/lib/ErrorManager.php 2012-11-21 10:15:22 UTC (rev 8506) @@ -385,6 +385,11 @@ */ function ErrorManager_errorHandler($errno, $errstr, $errfile, $errline) { + // TODO: Temporary hack to have errors displayed on dev machines. + if (defined('DEBUG') and DEBUG and $errno < 2048) { + print "<br/>PhpWiki Warning: ($errno, $errstr, $errfile, $errline)"; + } + if (!isset($GLOBALS['ErrorManager'])) { $GLOBALS['ErrorManager'] = new ErrorManager; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2012-12-11 14:49:04
|
Revision: 8644 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=8644&view=rev Author: vargenau Date: 2012-12-11 14:48:56 +0000 (Tue, 11 Dec 2012) Log Message: ----------- Fix exit Modified Paths: -------------- trunk/lib/ErrorManager.php Modified: trunk/lib/ErrorManager.php =================================================================== --- trunk/lib/ErrorManager.php 2012-12-11 14:30:38 UTC (rev 8643) +++ trunk/lib/ErrorManager.php 2012-12-11 14:48:56 UTC (rev 8644) @@ -330,8 +330,9 @@ PrintXML($this->_flush_errors()); if ($this->_fatal_handler) $this->_fatal_handler->call($error); - if (!$WikiTheme->DUMP_MODE) - exit - 1; + if (!$WikiTheme->DUMP_MODE) { + exit(); + } } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-01 10:29:08
|
Revision: 9144 http://sourceforge.net/p/phpwiki/code/9144 Author: vargenau Date: 2014-10-01 10:29:06 +0000 (Wed, 01 Oct 2014) Log Message: ----------- Avoid backslash Modified Paths: -------------- trunk/lib/ErrorManager.php Modified: trunk/lib/ErrorManager.php =================================================================== --- trunk/lib/ErrorManager.php 2014-10-01 10:08:54 UTC (rev 9143) +++ trunk/lib/ErrorManager.php 2014-10-01 10:29:06 UTC (rev 9144) @@ -263,7 +263,7 @@ echo "<head>\n"; echo "<meta charset=\"UTF-8\" />\n"; echo "<title>Fatal Error</title>\n"; - echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"themes/default/phpwiki.css\" />\n"; + echo '<link rel="stylesheet" type="text/css" href="themes/default/phpwiki.css" />'."\n"; echo "</head>\n"; echo "<body>\n"; echo "<div style=\"font-weight:bold; color:red\">Fatal Error:</div>\n"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-10-09 18:36:58
|
Revision: 9237 http://sourceforge.net/p/phpwiki/code/9237 Author: vargenau Date: 2014-10-09 18:36:52 +0000 (Thu, 09 Oct 2014) Log Message: ----------- Add ; Modified Paths: -------------- trunk/lib/ErrorManager.php Modified: trunk/lib/ErrorManager.php =================================================================== --- trunk/lib/ErrorManager.php 2014-10-09 18:35:20 UTC (rev 9236) +++ trunk/lib/ErrorManager.php 2014-10-09 18:36:52 UTC (rev 9237) @@ -265,7 +265,7 @@ echo '<link rel="stylesheet" type="text/css" href="themes/default/phpwiki.css" />'."\n"; echo "</head>\n"; echo "<body>\n"; - echo "<div style=\"font-weight:bold; color:red\">Fatal Error:</div>\n"; + echo "<div style=\"font-weight:bold; color:red;\">Fatal Error:</div>\n"; if (defined('DEBUG') and (DEBUG & _DEBUG_TRACE)) { echo "error_reporting=", error_reporting(), "\n<br />"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2015-02-25 15:06:25
|
Revision: 9560 http://sourceforge.net/p/phpwiki/code/9560 Author: vargenau Date: 2015-02-25 15:06:23 +0000 (Wed, 25 Feb 2015) Log Message: ----------- Remove debug code Modified Paths: -------------- trunk/lib/ErrorManager.php Modified: trunk/lib/ErrorManager.php =================================================================== --- trunk/lib/ErrorManager.php 2015-02-25 15:05:31 UTC (rev 9559) +++ trunk/lib/ErrorManager.php 2015-02-25 15:06:23 UTC (rev 9560) @@ -631,9 +631,8 @@ $lines = explode("\n", $this->errstr); elseif (is_object($this->errstr)) $lines = array($this->errstr->asXML()); - $errtype = (DEBUG & _DEBUG_VERBOSE) ? sprintf("%s[%d]", $this->getDescription(), $this->errno) - : sprintf("%s", $this->getDescription()); - if ((DEBUG & _DEBUG_VERBOSE) or $this->isFatal()) { + $errtype = sprintf("%s", $this->getDescription()); + if ($this->isFatal()) { $msg = sprintf("%s:%d %s: %s %s", $errfile, $this->errline, $errtype, @@ -646,8 +645,7 @@ array_shift($lines), $count > 1 ? sprintf(" (...repeated %d times)", $count) : ""); } - $html = HTML::div(array('class' => $this->getHtmlClass()), - HTML::p($msg)); + $html = HTML::div(array('class' => $this->getHtmlClass()), HTML::p($msg)); if ($lines) { $list = HTML::ul(); foreach ($lines as $line) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2015-03-04 15:59:37
|
Revision: 9598 http://sourceforge.net/p/phpwiki/code/9598 Author: vargenau Date: 2015-03-04 15:59:35 +0000 (Wed, 04 Mar 2015) Log Message: ----------- Remove commented code Modified Paths: -------------- trunk/lib/ErrorManager.php Modified: trunk/lib/ErrorManager.php =================================================================== --- trunk/lib/ErrorManager.php 2015-03-04 15:49:28 UTC (rev 9597) +++ trunk/lib/ErrorManager.php 2015-03-04 15:59:35 UTC (rev 9598) @@ -2,19 +2,8 @@ if (isset($GLOBALS['ErrorManager'])) return; -// php5: ignore E_STRICT (var warnings) -/* -if (defined('E_STRICT') - and (E_ALL & E_STRICT) - and (error_reporting() & E_STRICT)) { - echo " errormgr: error_reporting=", error_reporting(); - echo "\nplease fix that in your php.ini!"; - error_reporting(E_ALL & ~E_STRICT); -} -*/ define ('EM_FATAL_ERRORS', E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | ~2048 & (~E_DEPRECATED)); -define ('EM_WARNING_ERRORS', - E_WARNING | E_CORE_WARNING | E_COMPILE_WARNING | E_USER_WARNING | E_DEPRECATED); +define ('EM_WARNING_ERRORS', E_WARNING | E_CORE_WARNING | E_COMPILE_WARNING | E_USER_WARNING | E_DEPRECATED); define ('EM_NOTICE_ERRORS', E_NOTICE | E_USER_NOTICE); /* It is recommended to leave assertions on. @@ -82,7 +71,6 @@ PrintXML($this->_flush_errors($newmask)); else echo($this->_flush_errors($newmask)); - } /** @@ -304,7 +292,6 @@ private function _die($error) { global $WikiTheme; - //echo "\n\n<html><body>"; $error->printXML(); PrintXML($this->_flush_errors()); if ($this->_fatal_handler) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2019-04-19 08:03:23
|
Revision: 10111 http://sourceforge.net/p/phpwiki/code/10111 Author: vargenau Date: 2019-04-19 08:03:22 +0000 (Fri, 19 Apr 2019) Log Message: ----------- Revert r10110 for lib/ErrorManager.php Modified Paths: -------------- trunk/lib/ErrorManager.php Modified: trunk/lib/ErrorManager.php =================================================================== --- trunk/lib/ErrorManager.php 2019-04-19 07:03:31 UTC (rev 10110) +++ trunk/lib/ErrorManager.php 2019-04-19 08:03:22 UTC (rev 10111) @@ -66,7 +66,7 @@ $this->_postpone_mask = 0; $this->_postponed_errors = array(); - // set_error_handler('ErrorManager_errorHandler'); + set_error_handler('ErrorManager_errorHandler'); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2019-09-02 20:15:00
|
Revision: 10148 http://sourceforge.net/p/phpwiki/code/10148 Author: vargenau Date: 2019-09-02 20:14:58 +0000 (Mon, 02 Sep 2019) Log Message: ----------- Revert lib/ErrorManager.php Modified Paths: -------------- trunk/lib/ErrorManager.php Modified: trunk/lib/ErrorManager.php =================================================================== --- trunk/lib/ErrorManager.php 2019-09-02 19:17:09 UTC (rev 10147) +++ trunk/lib/ErrorManager.php 2019-09-02 20:14:58 UTC (rev 10148) @@ -66,7 +66,7 @@ $this->_postpone_mask = 0; $this->_postponed_errors = array(); - // set_error_handler('ErrorManager_errorHandler'); + set_error_handler('ErrorManager_errorHandler'); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |