I've got a class that handles my errors, and it seems to work okay. However, I have most of my content in include files and if it comes across an error in there, it appears to bubble back up, and not show the file or line that caused the error. For example:
File A (includes error handler class)
Line 40: include B.php
File B
Line 80: use a variable that doesn't exist (this is USER_NOTICE type error if that makes any diff)
However, when this error is handled, it only shows A.php line 40. I'm putting the debug_backtrace into an array and printing that out gives me:
Array
(
[0] => Array
(
[file] => A.php
[line] => 40
[args] => Array
(
[0] => B.php
)
[function] => include_once
)
)
So I can see the included file in the args array but no line number. If I change the included file so that it contains functions that I call from A.php, I get
Array
(
[0] => Array
(
[file] => A.php
[line] => 40
[function] => display
[args] => Array
(
)
)
)
No args value this time. It must be possible to trace the line number of the INCLUDEd file that raised the error, and I'm pretty sure it's something dumb I'm doing, but my google-fu is letting me down.