GIT.Harvie.CZ
/
mirrors
/
Kyberia-bloodline.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
368d735
)
Strict but sane Error reporting system
author
Harvie
<tomas@mudrunka.cz>
Mon, 16 May 2011 04:51:05 +0000
(06:51 +0200)
committer
Harvie
<tomas@mudrunka.cz>
Mon, 16 May 2011 04:53:25 +0000
(06:53 +0200)
wwwroot/_ajax/ajaxik.php
patch
|
blob
|
blame
|
history
wwwroot/_ajax/get_children.php
patch
|
blob
|
blame
|
history
wwwroot/_ajax/get_id_by_name.php
patch
|
blob
|
blame
|
history
wwwroot/_ajax/get_moods.php
patch
|
blob
|
blame
|
history
wwwroot/_ajax/get_username_by_id.php
patch
|
blob
|
blame
|
history
wwwroot/_ajax/testing.php
patch
|
blob
|
blame
|
history
wwwroot/inc/log.inc
patch
|
blob
|
blame
|
history
wwwroot/inc/rssparse.php
patch
|
blob
|
blame
|
history
wwwroot/inc/smarty/node_methodz/function.get_moods.php
patch
|
blob
|
blame
|
history
wwwroot/nodes.php
patch
|
blob
|
blame
|
history
diff --git
a/wwwroot/_ajax/ajaxik.php
b/wwwroot/_ajax/ajaxik.php
index e1eaca7d67df27f57d8acfae6c159bb451f2e013..ea562e4ede569b6e9b760bd0f74f937899ad9f47 100644
(file)
--- a/
wwwroot/_ajax/ajaxik.php
+++ b/
wwwroot/_ajax/ajaxik.php
@@
-1,5
+1,5
@@
<?php
<?php
-error_reporting(
1
);
+error_reporting(
E_ALL | E_STRICT
);
session_start();
require('../config/config.inc');
require(INCLUDE_DIR.'database.inc');
session_start();
require('../config/config.inc');
require(INCLUDE_DIR.'database.inc');
diff --git
a/wwwroot/_ajax/get_children.php
b/wwwroot/_ajax/get_children.php
index 86b69263c7e66ad7a6ccee12d71c3ea9eee1ef69..ed3d98d4be10a30b5224c4b13ee966950f538670 100644
(file)
--- a/
wwwroot/_ajax/get_children.php
+++ b/
wwwroot/_ajax/get_children.php
@@
-1,5
+1,5
@@
<?php
<?php
-error_reporting(
1
);
+error_reporting(
E_ALL | E_STRICT
);
require('../config/config.inc');
require(INCLUDE_DIR.'database.inc');
$db=new CLASS_DATABASE();
require('../config/config.inc');
require(INCLUDE_DIR.'database.inc');
$db=new CLASS_DATABASE();
diff --git
a/wwwroot/_ajax/get_id_by_name.php
b/wwwroot/_ajax/get_id_by_name.php
index b31ea48be976a10fb0e7ed917de1fdcf3e0d21f8..2731b04498d701cddd70b18c06ad2678f7a2825a 100644
(file)
--- a/
wwwroot/_ajax/get_id_by_name.php
+++ b/
wwwroot/_ajax/get_id_by_name.php
@@
-1,5
+1,5
@@
<?php
<?php
-error_reporting(
0
);
+error_reporting(
E_ALL | E_STRICT
);
require('../config/config.inc');
require(INCLUDE_DIR.'database.inc');
$db=new CLASS_DATABASE();
require('../config/config.inc');
require(INCLUDE_DIR.'database.inc');
$db=new CLASS_DATABASE();
diff --git
a/wwwroot/_ajax/get_moods.php
b/wwwroot/_ajax/get_moods.php
index 03342fab183587c79edc7d85c60517d8e5eeb7cf..928ebc2d58e79e1806eca5cfcc65c63ac6288aca 100644
(file)
--- a/
wwwroot/_ajax/get_moods.php
+++ b/
wwwroot/_ajax/get_moods.php
@@
-1,5
+1,5
@@
<?php
<?php
-error_reporting(
1
);
+error_reporting(
E_ALL | E_STRICT
);
session_start();
require('../config/config.inc');
require(INCLUDE_DIR.'database.inc');
session_start();
require('../config/config.inc');
require(INCLUDE_DIR.'database.inc');
diff --git
a/wwwroot/_ajax/get_username_by_id.php
b/wwwroot/_ajax/get_username_by_id.php
index b31ea48be976a10fb0e7ed917de1fdcf3e0d21f8..2731b04498d701cddd70b18c06ad2678f7a2825a 100644
(file)
--- a/
wwwroot/_ajax/get_username_by_id.php
+++ b/
wwwroot/_ajax/get_username_by_id.php
@@
-1,5
+1,5
@@
<?php
<?php
-error_reporting(
0
);
+error_reporting(
E_ALL | E_STRICT
);
require('../config/config.inc');
require(INCLUDE_DIR.'database.inc');
$db=new CLASS_DATABASE();
require('../config/config.inc');
require(INCLUDE_DIR.'database.inc');
$db=new CLASS_DATABASE();
diff --git
a/wwwroot/_ajax/testing.php
b/wwwroot/_ajax/testing.php
index a5d2a1b8602952753c8ca2a9dfa2bec7e5ba5e0f..4473c7c40c8352b1a97d7b55f6140e3dde4e2863 100644
(file)
--- a/
wwwroot/_ajax/testing.php
+++ b/
wwwroot/_ajax/testing.php
@@
-1,5
+1,5
@@
<?php
<?php
-error_reporting(
1
);
+error_reporting(
E_ALL | E_STRICT
);
session_start();
require('../config/config.inc');
require(INCLUDE_DIR.'database.inc');
session_start();
require('../config/config.inc');
require(INCLUDE_DIR.'database.inc');
diff --git
a/wwwroot/inc/log.inc
b/wwwroot/inc/log.inc
index 628bde5c14b54887db5efbfb2eb555164be4c85e..994ce4de3bf20e245810788f0b337ecb1996d8ef 100644
(file)
--- a/
wwwroot/inc/log.inc
+++ b/
wwwroot/inc/log.inc
@@
-1,6
+1,10
@@
<?php
class logger {
<?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;
public static function log($action,$node_id,$result,$parameter1='',$parameter2='') {
global $db,$node;
@@
-12,4
+16,3
@@
class logger {
}
}
}
}
-?>
diff --git
a/wwwroot/inc/rssparse.php
b/wwwroot/inc/rssparse.php
index 5d342a8bd67e1de04c9e129d33225a679bd272a0..7af7df0240e4f8543b8d12a08ad96e342a7ea9b6 100644
(file)
--- a/
wwwroot/inc/rssparse.php
+++ b/
wwwroot/inc/rssparse.php
@@
-1,5
+1,4
@@
<?php
<?php
-error_reporting(0);
// include lastRSS library
include './lastRSS.php';
// include lastRSS library
include './lastRSS.php';
diff --git
a/wwwroot/inc/smarty/node_methodz/function.get_moods.php
b/wwwroot/inc/smarty/node_methodz/function.get_moods.php
index 006f85f29e0cb14d6ddfeca77adee594799cb26a..5d35ea045e4897ead0c495f73a4c4cf2c0b81427 100644
(file)
--- a/
wwwroot/inc/smarty/node_methodz/function.get_moods.php
+++ b/
wwwroot/inc/smarty/node_methodz/function.get_moods.php
@@
-1,7
+1,6
@@
<?php
function smarty_function_get_moods($params,&$smarty) {
global $db;
<?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();
$user_id = $params['user_id'];
$set = $db->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);
}
$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 8b9edaade48e867165231eb5464b472d3aa8ee6a..5b9a9a3b2126639fa67a60b7b1bfa4781bdf17cd 100644
(file)
--- a/
wwwroot/nodes.php
+++ b/
wwwroot/nodes.php
@@
-81,20
+81,21
@@
if (!empty($_GET['template_id'])) {
$template_id=false;
}
$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;
//$_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);
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
}
require_once(INCLUDE_DIR.'logout_idle.inc'); //Logout when idle
This page took
0.226262 seconds
and
4
git commands to generate.