ID: 28054
Comment by: olivier dot bichler at laposte dot net
Reported By: misu200 at yahoo dot com
Status: Open
Bug Type: Unknown/Other Function
Operating System: Fedora Linux kernel 2.6.4
PHP Version: 5.0.0RC1
New Comment:
And there is an other problem : why the arguments $errNo, $errStr,
$errFile, $errLine are not present in the result of debug_backtrace()
?
I have the same problem...
Previous Comments:
------------------------------------------------------------------------
[2004-04-19 09:05:28] misu200 at yahoo dot com
Description:
------------
I set my own error handle function and then i try to include a
non-existent file (aga.php).The problem is when i make a
var_dump(debug_backtrace()) in my error handle function it shows me
wrong results.
Reproduce code:
---------------
<?php
function ourErrorHandler($errNo, $errStr, $errFile, $errLine)
{
echo "<PRE>";
var_dump(debug_backtrace());
echo "</PRE>";
}
// set the user error handler to be the above
$oldErrorHandler = set_error_handler("ourErrorHandler",
error_reporting());
require_once("aga.php");
?>
Expected result:
----------------
array(2) {
[0]=>
array(3) {
["file"]=>
string(28) "/var/www/html/dir1/file2.php"
["line"]=>
int(15)
["function"]=>
string(15) "ourErrorHandler"
}
[1]=>
array(4) {
["file"]=>
string(28) "/var/www/html/dir1/file2.php"
["line"]=>
int(15)
["args"]=>
array(1) {
[0]=>
string(28) "aga.php" < - this should be here
}
["function"]=>
string(12) "require_once"
}
}
Actual result:
--------------
array(2) {
[0]=>
array(3) {
["file"]=>
string(28) "/var/www/html/dir1/file2.php"
["line"]=>
int(15)
["function"]=>
string(15) "ourErrorHandler"
}
[1]=>
array(4) {
["file"]=>
string(28) "/var/www/html/dir1/file2.php"
["line"]=>
int(15)
["args"]=>
array(1) {
[0]=>
string(28) "/var/www/html/dir1/file2.php" <- is wrong
}
["function"]=>
string(12) "require_once"
}
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28054&edit=1