#34110 [Bgs]: debug_print_backtrace prints wrong arguments
| From: | tony2001@php.net | Date: | Fri, 12 Aug 2005 22:31:54 +0000 |
| Subject: | #34110 [Bgs]: debug_print_backtrace prints wrong arguments | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-83498@lists.php.net to get a copy of this message | ||
ID: 34110
Updated by: tony2001@php.net
Reported By: iblue at gmx dot net
Status: Bogus
Bug Type: Unknown/Other Function
Operating System: Linux
PHP Version: 5.0.4
New Comment:
Your error function *ACCEPTS* only 4 arguments, but 5 of them are
passed.
No bug here, this is expected and documented behaviour.
Previous Comments:
------------------------------------------------------------------------
[2005-08-13 00:27:31] iblue at gmx dot net
My errorhandler()-function only uses 4 parameters, but 5 printed, this
is a bug.
------------------------------------------------------------------------
[2005-08-13 00:14:18] tony2001@php.net
This is expected:
"The fifth parameter is optional, errcontext , which is an array that
points to the active symbol table at the point the error occurred. In
other words, errcontext will contain an array of every variable that
existed in the scope the error was triggered in."
(c) http://www.php.net/set_error_handler
------------------------------------------------------------------------
[2005-08-12 23:45:45] iblue at gmx dot net
The difference is
Array ([x] => 20,[z] =>0)
Actual result:
#0 errorhandler(2, Division by zero,
/home/iblue/public_html/the_engine/index.php, 8, Array ([x] => 20,[z]
=>
0)) called at [/home/iblue/public_html/the_engine/index.php:8]
Expected result:
#0 errorhandler(2, Division by zero,
/home/iblue/public_html/the_engine/index.php, 8) called at
[/home/iblue/public_html/the_engine/index.php:8]
#1 test(20, 0) called at
[/home/iblue/public_html/the_engine/index.php:6]
Do you see the addictional arguments in #0 after "...index.php, 8"?
Seen it?
------------------------------------------------------------------------
[2005-08-12 23:39:26] tony2001@php.net
I can't find any differencies between the expected result and what
you've just posted.
------------------------------------------------------------------------
[2005-08-12 23:33:19] iblue at gmx dot net
iblue@neandertal:~/php5-200508122030$ ./sapi/cli/php -q
~/public_html/bug.php
#0 errorhandler(2, Division by zero,
/home/iblue/public_html/the_engine/index.php, 8, Array ([x] => 20,[z]
=> 0)) called at [/home/iblue/public_html/the_engine/index.php:8]
#1 test(20, 0) called at
[/home/iblue/public_html/the_engine/index.php:6]
better, but not right ;)
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/34110
--
Edit this bug report at http://bugs.php.net/?id=34110&edit=1