From 8f03b4aca1ae066a7fb03e4f5204682932091e08 Mon Sep 17 00:00:00 2001 From: Harvie Date: Mon, 16 May 2011 06:51:05 +0200 Subject: [PATCH] Strict but sane Error reporting system --- wwwroot/_ajax/ajaxik.php | 2 +- wwwroot/_ajax/get_children.php | 2 +- wwwroot/_ajax/get_id_by_name.php | 2 +- wwwroot/_ajax/get_moods.php | 2 +- wwwroot/_ajax/get_username_by_id.php | 2 +- wwwroot/_ajax/testing.php | 2 +- wwwroot/inc/log.inc | 5 ++++- wwwroot/inc/rssparse.php | 1 - wwwroot/inc/smarty/node_methodz/function.get_moods.php | 3 +-- wwwroot/nodes.php | 7 ++++--- 10 files changed, 15 insertions(+), 13 deletions(-) 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 -- 2.30.2