|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-04-19 16:45 UTC] olivier dot bichler at laposte dot net
[2004-04-19 20:12 UTC] derick@php.net
[2005-05-17 14:29 UTC] stas@php.net
[2005-06-23 10:27 UTC] dmitry@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 30 20:00:01 2025 UTC |
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" } }