summaryrefslogtreecommitdiff
path: root/it_debug.class
diff options
context:
space:
mode:
Diffstat (limited to 'it_debug.class')
-rw-r--r--it_debug.class9
1 files changed, 6 insertions, 3 deletions
diff --git a/it_debug.class b/it_debug.class
index e654851..79433db 100644
--- a/it_debug.class
+++ b/it_debug.class
@@ -135,10 +135,13 @@ function backtrace($skip = 0)
{
$result = array();
- foreach (array_slice(debug_backtrace(), $skip + 1) as $call)
+ if (!function_exists('memory_get_usage') || (memory_get_usage() < 50000000))
{
- if ($call['file'])
- $result[] = basename($call['file']) . ":" . $call['line'];
+ foreach (array_slice(debug_backtrace(), $skip + 1) as $call)
+ {
+ if ($call['file'])
+ $result[] = basename($call['file']) . ":" . $call['line'];
+ }
}
return join(" ", $result);