From: Harvie Date: Mon, 16 May 2011 04:51:05 +0000 (+0200) Subject: Strict but sane Error reporting system X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=8f03b4aca1ae066a7fb03e4f5204682932091e08;p=mirrors%2FKyberia-bloodline.git Strict but sane Error reporting system --- diff --git a/wwwroot/_ajax/ajaxik.php b/wwwroot/_ajax/ajaxik.php index e1eaca7..ea562e4 100644 --- a/wwwroot/_ajax/ajaxik.php +++ b/wwwroot/_ajax/ajaxik.php @@ -1,5 +1,5 @@ diff --git a/wwwroot/inc/rssparse.php b/wwwroot/inc/rssparse.php index 5d342a8..7af7df0 100644 --- a/wwwroot/inc/rssparse.php +++ b/wwwroot/inc/rssparse.php @@ -1,5 +1,4 @@ query(sprintf('select moods from users where user_id = %d', $user_id)); $set->next(); @@ -38,4 +37,4 @@ error_reporting(1); $smarty->assign('get_moods_string',$moods_string); $smarty->assign('get_moods_mood',$mood); } -?> \ No newline at end of file +?> diff --git a/wwwroot/nodes.php b/wwwroot/nodes.php index 8b9edaa..5b9a9a3 100644 --- a/wwwroot/nodes.php +++ b/wwwroot/nodes.php @@ -81,20 +81,21 @@ if (!empty($_GET['template_id'])) { $template_id=false; } -error_reporting(1); +error_reporting(E_ALL | E_STRICT); //$_SESSION['debugging']=0; //unset($_SESSION['debugging']); //Well... we should make some event //or JavaScript page to turning this on/off... //exit; -if ($_SESSION['debugging']) { - error_reporting(E_ALL); +if(isset($_SESSION['debugging']) && $_SESSION['debugging']) { echo 'GET VARIABLES::
'; print_r($_GET); echo 'POST VARIABLES::
'; print_r($_POST); echo 'SESSION VARIABLES::
'; print_r($_SESSION); +} else { + set_error_handler('logger::error_handler'); } require_once(INCLUDE_DIR.'logout_idle.inc'); //Logout when idle