<?php
-error_reporting(1);
+error_reporting(E_ALL | E_STRICT);
session_start();
require('../config/config.inc');
require(INCLUDE_DIR.'database.inc');
<?php
-error_reporting(1);
+error_reporting(E_ALL | E_STRICT);
require('../config/config.inc');
require(INCLUDE_DIR.'database.inc');
$db=new CLASS_DATABASE();
<?php
-error_reporting(0);
+error_reporting(E_ALL | E_STRICT);
require('../config/config.inc');
require(INCLUDE_DIR.'database.inc');
$db=new CLASS_DATABASE();
<?php
-error_reporting(1);
+error_reporting(E_ALL | E_STRICT);
session_start();
require('../config/config.inc');
require(INCLUDE_DIR.'database.inc');
<?php
-error_reporting(0);
+error_reporting(E_ALL | E_STRICT);
require('../config/config.inc');
require(INCLUDE_DIR.'database.inc');
$db=new CLASS_DATABASE();
<?php
-error_reporting(1);
+error_reporting(E_ALL | E_STRICT);
session_start();
require('../config/config.inc');
require(INCLUDE_DIR.'database.inc');
<?php
class logger {
+ public static function error_handler($errno=-1, $errstr='unknown', $errfile='/dev/null', $errline=-1, $errcontext=array('?')) {
+ return error_log("$errfile:$errline = error #$errno: $errstr");
+ }
+
public static function log($action,$node_id,$result,$parameter1='',$parameter2='') {
global $db,$node;
}
}
-?>
<?php
-error_reporting(0);
// include lastRSS library
include './lastRSS.php';
<?php
function smarty_function_get_moods($params,&$smarty) {
global $db;
-error_reporting(1);
$user_id = $params['user_id'];
$set = $db->query(sprintf('select moods from users where user_id = %d', $user_id));
$set->next();
$smarty->assign('get_moods_string',$moods_string);
$smarty->assign('get_moods_mood',$mood);
}
-?>
\ No newline at end of file
+?>
$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::<br/>';
print_r($_GET);
echo 'POST VARIABLES::<br/>';
print_r($_POST);
echo '<b>SESSION VARIABLES::</b><br/>';
print_r($_SESSION);
+} else {
+ set_error_handler('logger::error_handler');
}
require_once(INCLUDE_DIR.'logout_idle.inc'); //Logout when idle