From 38351f0b8476b39fc2762ebf081cddefd411ddf8 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 2 Jul 2007 14:17:33 +0000 Subject: only include stackdump if mem usage low --- it.class | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'it.class') 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'])) { -- cgit v1.2.3