summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorUrban Müller2007-07-02 14:17:33 +0000
committerUrban Müller2007-07-02 14:17:33 +0000
commit38351f0b8476b39fc2762ebf081cddefd411ddf8 (patch)
treeef3dcf213250c59a654afa68d228322d6c8b3162 /it.class
parent8d32aa83817b6c71030c0a77f7559ba51adcebdc (diff)
downloaditools-38351f0b8476b39fc2762ebf081cddefd411ddf8.tar.gz
itools-38351f0b8476b39fc2762ebf081cddefd411ddf8.tar.bz2
itools-38351f0b8476b39fc2762ebf081cddefd411ddf8.zip
only include stackdump if mem usage low
Diffstat (limited to 'it.class')
-rw-r--r--it.class5
1 files changed, 4 insertions, 1 deletions
diff --git a/it.class b/it.class
index 0819937..832380a 100644
--- a/it.class
+++ b/it.class
@@ -117,7 +117,10 @@ function error($p = array(), $body = "", $to = "")
if (!$title)
$title="Error in $url";
- $body .= "\nUrl: $url\n\n\$_REQUEST: ".print_r($_REQUEST, true). "\nTrace: " . it_debug::backtrace() . "\nStack:\n" . print_r(debug_backtrace(), true) . "\n\$_SERVER: " . print_r($_SERVER, true);
+ if (memory_get_usage() < 50000000)
+ $stack = "\nTrace: " . it_debug::backtrace() . "\nStack:\n" . print_r(debug_backtrace(), true);
+
+ $body .= "\nUrl: $url\n\n\$_REQUEST: ".print_r($_REQUEST, true) . $stack . "\n\$_SERVER: " . print_r($_SERVER, true);
if (!ereg('live', $GLOBALS['ULTRASERVERTYPE']))
{