From:             iblue at gmx dot net
Operating system: Linux 
PHP version:      5.0.4
PHP Bug Type:     Unknown/Other Function
Bug description:  debug_print_backtrace prints wrong arguments

Description:
------------
debug_print_backtrace() and debug_backtrace() give both the same wrong
results in combination with set_error_handler().
-----------------
php5 -v
PHP 5.0.4-1.dotdeb.2 (cli) (built: Jun 28 2005 12:17:46)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies
----------------- 

Reproduce code:
---------------
<?php
  set_error_handler("errorhandler");
  function errorhandler($errno, $errstr, $errfile, $errline
  {
    debug_print_backtrace();
  }
  test(20,0);
  function test($x,$z)
  {
    echo $x/$z;
  }
?>

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]


Actual result:
--------------
#0  errorhandler() called at
[/home/iblue/public_html/the_engine/index.php:8]
#1  test() called at [/home/iblue/public_html/the_engine/index.php:8]
#2  test(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:6]



-- 
Edit bug report at http://bugs.php.net/?id=34110&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=34110&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=34110&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=34110&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=34110&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=34110&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=34110&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=34110&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=34110&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=34110&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=34110&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=34110&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=34110&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=34110&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=34110&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=34110&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=34110&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=34110&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=34110&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=34110&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=34110&r=mysqlcfg

Reply via email to