]> granicus.if.org Git - php/commitdiff
Fixed bug #28377 (debug_backtrace is intermittently passing args)
authorDmitry Stogov <dmitry@php.net>
Thu, 23 Jun 2005 12:21:01 +0000 (12:21 +0000)
committerDmitry Stogov <dmitry@php.net>
Thu, 23 Jun 2005 12:21:01 +0000 (12:21 +0000)
NEWS
tests/lang/bug28377.phpt [new file with mode: 0755]

diff --git a/NEWS b/NEWS
index 9e8f8e3fa095ac2ddd6cb2d122bdc5527f6299ed..280ac44d58f508978a31257e06aab3c19a05d3cd 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ PHP 4                                                                      NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2005, Version 4.4.0
 - Fixed bug #31213 (Sideeffects caused by fix of bug #29493). (Dmitry)
+- Fixed bug #28377 (debug_backtrace is intermittently passing args). (Dmitry)
 
 13 Jun 2005, Version 4.4.0 RC1
 - Added man pages for "phpize" and "php-config" scripts. (Jakub Vrana)
diff --git a/tests/lang/bug28377.phpt b/tests/lang/bug28377.phpt
new file mode 100755 (executable)
index 0000000..9d1b434
--- /dev/null
@@ -0,0 +1,23 @@
+--TEST--
+Bug #28377 (debug_backtrace is intermittently passing args)
+--FILE--
+<?php
+function doit($a, $b)
+{
+  $trace = debug_backtrace();
+  custom_callback('dereferenced', $trace);
+  custom_callback('direct', debug_backtrace());
+}
+  
+function custom_callback($traceName, $btInfo)
+{
+  echo $traceName ." -- args: ";
+  echo isset($btInfo[0]['args']) ? count($btInfo[0]['args']) : 'does not exist';
+  echo "\n";
+}
+  
+doit('a','b');
+?>
+--EXPECT--
+dereferenced -- args: 2
+direct -- args: 2