diff options
author | Urban Müller | 2007-07-02 14:17:33 +0000 |
---|---|---|
committer | Urban Müller | 2007-07-02 14:17:33 +0000 |
commit | 38351f0b8476b39fc2762ebf081cddefd411ddf8 (patch) | |
tree | ef3dcf213250c59a654afa68d228322d6c8b3162 | |
parent | 8d32aa83817b6c71030c0a77f7559ba51adcebdc (diff) | |
download | itools-38351f0b8476b39fc2762ebf081cddefd411ddf8.tar.gz itools-38351f0b8476b39fc2762ebf081cddefd411ddf8.tar.bz2 itools-38351f0b8476b39fc2762ebf081cddefd411ddf8.zip |
only include stackdump if mem usage low
-rw-r--r-- | it.class | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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'])) { |