summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2011-10-24 12:53:16 +0000
committerUrban Müller2011-10-24 12:53:16 +0000
commit72def8e17325a12a097789800837cbb8d7df2697 (patch)
tree4c5f2a93990bcf9832dea41417f59ab6c156af5a
parent5d308e1be9570ea4c747d3f13c669a246a592480 (diff)
downloaditools-72def8e17325a12a097789800837cbb8d7df2697.tar.gz
itools-72def8e17325a12a097789800837cbb8d7df2697.tar.bz2
itools-72def8e17325a12a097789800837cbb8d7df2697.zip
prevent $GLOBALS destruction, remote lastsent debugging
-rw-r--r--it.class7
1 files changed, 2 insertions, 5 deletions
diff --git a/it.class b/it.class
index 367908d..3f9ccf0 100644
--- a/it.class
+++ b/it.class
@@ -184,7 +184,6 @@ static function error($p = array(), $body = null, $to = null) # $body and $to de
clearstatcache();
$lastsenttime = @filemtime($lastsentfn);
$sendmail = $now - $lastsenttime > $p['blockmail'];
- $lastsentdebug = "Lastsent: lastsentfn=$lastsentfn now=$now lastsenttime=$lastsenttime blockmail={$p['blockmail']} sendmail=$sendmail errstampage=$errstampage\n\n";
if ($sendmail)
{
@unlink($lastsentfn);
@@ -211,18 +210,16 @@ static function error($p = array(), $body = null, $to = null) # $body and $to de
if (!$p['omitdebuginfo'])
{
- unset ($p['locals']['GLOBALS'], $p['locals']['_GET'], $p['locals']['_POST'], $p['locals']['_COOKIE']);
- $locals = print_r($p['locals'], true);
+ $locals = print_r(array_diff_key((array)$p['locals'], array("GLOBALS", "_GET", "_POST", "_COOKIE")), true);
if ($trace && ($fulltrace = array_slice(debug_backtrace(), $p['backtraceskip'])))
while (strlen(print_r($fulltrace, true)) > 100000)
array_pop($fulltrace);
$body .= "Host: " . getenv('HOSTNAME') . "\n\n";
- $body .= $p['locals'] && strlen($locals) < 100000 ? "Locals: $locals\n\n" : "";
+ $body .= $locals && strlen($locals) < 100000 ? "Locals: $locals\n\n" : "";
$body .= $p['id'] ? "Filter: graceperiod={$p['graceperiod']} timewindow={$p['timewindow']}\n\n" : "";
$body .= "Time: " . it::date() . "\n\n";
- $body .= $lastsentdebug;
$body .= $_GET ? "\$_GET: " . var_export($_GET, true) . "\n\n" : "";
$body .= $_POST ? "\$_POST: " . var_export($_POST, true) . "\n\n" : "";
$body .= $_COOKIE ? "\$_COOKIE: " . var_export($_COOKIE, true) . "\n\n" : "";