]> granicus.if.org Git - php/commitdiff
Added test case for bug #24573
authorfoobar <sniper@php.net>
Fri, 18 Jul 2003 12:24:49 +0000 (12:24 +0000)
committerfoobar <sniper@php.net>
Fri, 18 Jul 2003 12:24:49 +0000 (12:24 +0000)
tests/lang/bug24573.phpt [new file with mode: 0644]

diff --git a/tests/lang/bug24573.phpt b/tests/lang/bug24573.phpt
new file mode 100644 (file)
index 0000000..a7c8ac5
--- /dev/null
@@ -0,0 +1,23 @@
+--TEST--
+Bug #24573 (debug_backtrace() crashes if $this is set to null)
+--FILE--
+<?php
+
+class Foo {
+  function Bar() {
+    $__this = $this;
+    $this = null;
+    debug_backtrace();
+    $this = $__this;
+  } 
+}
+
+$f = new Foo;
+
+$f->Bar();
+
+echo "OK\n";
+
+?>
+--EXPECT--
+OK