summaryrefslogtreecommitdiffstats
path: root/application/errors
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2011-10-18 17:03:27 +0200
committerDerek Jones <derek.jones@ellislab.com>2011-10-18 17:03:27 +0200
commitbf18178de31418d3a8202a82a34e24bb7cb84579 (patch)
treef7c279eea53976fc0b3c0298196ca7529c7fd91c /application/errors
parent961684280faccb7f32da700201422ecd8a454a0a (diff)
parent5160cc9a869e27a696f93f64127eef15c54f5d64 (diff)
Merge pull request #569 from timw4mail/patch-2
Added simple backtrace to php error file
Diffstat (limited to 'application/errors')
-rw-r--r--application/errors/error_php.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/application/errors/error_php.php b/application/errors/error_php.php
index f085c2037..514e477e8 100644
--- a/application/errors/error_php.php
+++ b/application/errors/error_php.php
@@ -7,4 +7,21 @@
<p>Filename: <?php echo $filepath; ?></p>
<p>Line Number: <?php echo $line; ?></p>
+<?php if(defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
+
+ <p>Backtrace: </p>
+ <?php foreach(debug_backtrace() as $error): ?>
+
+ <?php if(isset($error['file']) && ! stristr($error['file'], SYSDIR)): ?>
+ <p style="margin-left:10px">
+ File: <?php echo $error['file'] ?><br />
+ Line: <?php echo $error['line'] ?><br />
+ Function: <?php echo $error['function'] ?>
+ </p>
+ <? endif ?>
+
+ <? endforeach ?></p>
+
+<?php endif ?>
+
</div> \ No newline at end of file