summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/errors/error_php.php13
-rw-r--r--index.php1
-rw-r--r--user_guide_src/source/changelog.rst1
3 files changed, 14 insertions, 1 deletions
diff --git a/application/errors/error_php.php b/application/errors/error_php.php
index f085c2037..cf6cb9fac 100644
--- a/application/errors/error_php.php
+++ b/application/errors/error_php.php
@@ -6,5 +6,16 @@
<p>Message: <?php echo $message; ?></p>
<p>Filename: <?php echo $filepath; ?></p>
<p>Line Number: <?php echo $line; ?></p>
-
+<?php if(defined('SHOW_ERROR_BACKTRACE') && SHOW_ERROR_BACKTRACE === TRUE): ?>
+ <p>Backtrace: </p>
+ <?php foreach(debug_backtrace() as $error): ?>
+ <?php if(isset($error['file']) && ! stristr($error['file'], SYSDIR)): ?>
+ <p>
+ 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
diff --git a/index.php b/index.php
index c50cfed43..312fbfb1d 100644
--- a/index.php
+++ b/index.php
@@ -34,6 +34,7 @@ if (defined('ENVIRONMENT'))
{
case 'development':
error_reporting(-1);
+ define('SHOW_ERROR_BACKTRACE', TRUE);
break;
case 'testing':
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index bbf2ec778..8b74fa94c 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -9,6 +9,7 @@ Release Date: Not Released
- General Changes
+ - Added an optional backtrace to php-error template.
- Added Android to the list of user agents.
- Added Windows 7 to the list of user platforms.
- Callback validation rules can now accept parameters like any other