diff options
author | Urban Müller | 2011-06-27 13:15:30 +0000 |
---|---|---|
committer | Urban Müller | 2011-06-27 13:15:30 +0000 |
commit | 2992afc8ed18b066fcbe3a3ea7687a445365ac19 (patch) | |
tree | f00ffea533b814653febaa49ddbfe0f8d1dd2a0b | |
parent | ed29f152dd09160358a14bdc48d6aaa3bc57c289 (diff) | |
download | itools-2992afc8ed18b066fcbe3a3ea7687a445365ac19.tar.gz itools-2992afc8ed18b066fcbe3a3ea7687a445365ac19.tar.bz2 itools-2992afc8ed18b066fcbe3a3ea7687a445365ac19.zip |
fix php line number off by one
-rw-r--r-- | it_debug.class | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/it_debug.class b/it_debug.class index 941576c..b86c8f9 100644 --- a/it_debug.class +++ b/it_debug.class @@ -188,6 +188,9 @@ function backtrace($p = array()) { if (($fn = $call['file']) && !it::match($p['skipfiles'], $call['file'])) { + if (!it::match('\.class', $call['file']) && file_get_contents($call['file'], null, null, 0, 2) == "#!") + $call['line']++; # fix bug in php error line reporting + $fn = (it::match('auto_prepend', $fn) ? basename(dirname(dirname($fn))) . "/" : "") . basename($fn); $result[] = $fn . ":" . $call['line']; |