diff options
Diffstat (limited to 'lib/prado/framework/Exceptions/TErrorHandler.php')
-rw-r--r-- | lib/prado/framework/Exceptions/TErrorHandler.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/prado/framework/Exceptions/TErrorHandler.php b/lib/prado/framework/Exceptions/TErrorHandler.php index f9a120a..76f7396 100644 --- a/lib/prado/framework/Exceptions/TErrorHandler.php +++ b/lib/prado/framework/Exceptions/TErrorHandler.php @@ -4,7 +4,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado - * @copyright Copyright © 2005-2015 The PRADO Group + * @copyright Copyright © 2005-2016 The PRADO Group * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT * @package System.Exceptions */ @@ -345,7 +345,12 @@ class TErrorHandler extends TModule // if PHP exception, we want to show the 2nd stack level context // because the 1st stack level is of little use (it's in error handler) if($exception instanceof TPhpErrorException) - $result=isset($trace[0]['file'])?$trace[0]:$trace[1]; + { + if(isset($trace[0]['file'])) + $result=$trace[0]; + elseif(isset($trace[1])) + $result=$trace[1]; + } else if($exception instanceof TInvalidOperationException) { // in case of getter or setter error, find out the exact file and row |