From 0302893a331d9608f69e2b8280e297a513e52069 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Tue, 19 Dec 2006 03:29:10 +0000 Subject: [PATCH] Back up one level in BSRegister::_errorHandler() to see if we can get the location *before* trigger_error() --- Register.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Register.php b/Register.php index 77d17c5..ee0b625 100644 --- a/Register.php +++ b/Register.php @@ -486,6 +486,14 @@ class BSRegister break; } + // change the file and line of the error so we aren't looking at the location of the trigger_error() + $backtrace = debug_backtrace(); + if ($backtrace[1]['function'] == 'trigger_error' AND isset($backtrace[2]['file'])) + { + $errfile = $backtrace[2]['file']; + $errline = $backtrace[2]['line']; + } + $errstr .= " in $errfile on line $errline"; $errstr = str_replace(array(getcwd(), dirname(getcwd())), '', $errstr); -- 2.43.5