mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Little debug fix
This commit is contained in:
19
class2.php
19
class2.php
@@ -9,9 +9,9 @@
|
||||
* General purpose file
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/class2.php,v $
|
||||
* $Revision: 1.110 $
|
||||
* $Date: 2009-07-19 11:44:26 $
|
||||
* $Author: marj_nl_fr $
|
||||
* $Revision: 1.111 $
|
||||
* $Date: 2009-07-21 14:20:12 $
|
||||
* $Author: e107coders $
|
||||
*
|
||||
*/
|
||||
//
|
||||
@@ -1999,10 +1999,10 @@ class error_handler
|
||||
return;
|
||||
}
|
||||
|
||||
if ((isset($_SERVER['QUERY_STRING']) && strpos($_SERVER['QUERY_STRING'], 'debug=') !== FALSE) || isset($_COOKIE['e107_debug_level']))
|
||||
if ((isset($_SERVER['QUERY_STRING']) && strpos($_SERVER['QUERY_STRING'], 'debug=') !== FALSE) || isset($_COOKIE['e107_debug_level']) && strpos($_SERVER['QUERY_STRING'], 'debug=-') !== TRUE )
|
||||
{
|
||||
$this->debug = true;
|
||||
error_reporting(E_ALL);
|
||||
$this->debug = true;
|
||||
error_reporting(E_ALL);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2054,7 +2054,8 @@ class error_handler
|
||||
function return_errors()
|
||||
{
|
||||
$index = 0; $colours[0] = "#C1C1C1"; $colours[1] = "#B6B6B6";
|
||||
$ret = "<table class='fborder'>\n";
|
||||
$ret = "";
|
||||
|
||||
if (E107_DBG_ERRBACKTRACE)
|
||||
{
|
||||
foreach ($this->errors as $key => $value)
|
||||
@@ -2071,8 +2072,8 @@ class error_handler
|
||||
$ret .= "<tr class='forumheader3'><td>{$value['short']}</td></tr>\n";
|
||||
}
|
||||
}
|
||||
$ret .= '</table>';
|
||||
return $ret;
|
||||
|
||||
return ($ret) ? "<table class='fborder'>\n".$ret."</table>" : FALSE;
|
||||
}
|
||||
|
||||
function trigger_error($information, $level)
|
||||
|
@@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/db_debug_class.php,v $
|
||||
| $Revision: 1.10 $
|
||||
| $Date: 2009-07-12 02:29:24 $
|
||||
| $Revision: 1.11 $
|
||||
| $Date: 2009-07-21 14:20:13 $
|
||||
| $Author: e107coders $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@@ -625,13 +625,21 @@ global $error_handler,$e107_Clean_Exit,$In_e107_Footer,$ADMIN_DIRECTORY;
|
||||
while (ob_get_level() > 0) {
|
||||
ob_end_flush();
|
||||
}
|
||||
if (isset($error_handler))
|
||||
{
|
||||
echo "<br /><div 'e107_debug php_err'><h3>PHP Errors:</h3><br />".$error_handler->return_errors()."</div>\n";
|
||||
} else {
|
||||
echo "<b>e107 Shutdown while no error_handler available!</b>";
|
||||
|
||||
if (isset($error_handler) )
|
||||
{
|
||||
if($error_handler->return_errors())
|
||||
{
|
||||
echo "<br /><div 'e107_debug php_err'><h3>PHP Errors:</h3><br />".$error_handler->return_errors()."</div>\n";
|
||||
echo "</body></html>";
|
||||
}
|
||||
}
|
||||
echo "</body></html>";
|
||||
else
|
||||
{
|
||||
echo "<b>e107 Shutdown while no error_handler available!</b>";
|
||||
echo "</body></html>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user