#39111 [NEW]: debug_backtrace() has problems with static classes

From: Date: Tue, 10 Oct 2006 12:15:22 +0000
Subject: #39111 [NEW]: debug_backtrace() has problems with static classes
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-103356@lists.php.net to get a copy of this message
From: vincent dot guth at gmail dot com Operating system: * PHP version: 5.1.6 PHP Bug Type: Unknown/Other Function Bug description: debug_backtrace() has problems with static classes Description: ------------ The "class" parameter should be "B" instead of "A", as I called B::r() and not A::r(). Reproduce code: --------------- <?php abstract class A { public static function r() { var_dump(debug_backtrace()); } } class B extends A { } echo B::r(); ?> Expected result: ---------------- array(1) { [0]=> array(6) { ["file"]=> string(13) "/www/test.php" ["line"]=> int(12) ["function"]=> string(1) "r" ["class"]=> string(1) "B" /* Not A */ ["type"]=> string(2) "::" ["args"]=> array(0) { } } } Actual result: -------------- array(1) { [0]=> array(6) { ["file"]=> string(13) "/www/test.php" ["line"]=> int(12) ["function"]=> string(1) "r" ["class"]=> string(1) "A" ["type"]=> string(2) "::" ["args"]=> array(0) { } } } -- Edit bug report at http://bugs.php.net/?id=39111&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39111&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39111&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39111&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39111&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39111&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39111&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39111&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39111&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39111&r=support Expected behavior: http://bugs.php.net/fix.php?id=39111&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39111&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39111&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39111&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39111&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39111&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39111&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39111&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39111&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39111&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39111&r=mysqlcfg

« previous php.bugs (#103356) next »