summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2003-07-18 12:24:49 +0000
committerfoobar <sniper@php.net>2003-07-18 12:24:49 +0000
commita00e3f6f1e8ba9ce3419b3034d538d484f362c9f (patch)
tree43a7caadbcc4b968b392eacc9eb3e5565ef635a5 /tests
parent94756ffb8bb2980358db4832f1497fe295add47e (diff)
downloadphp-git-a00e3f6f1e8ba9ce3419b3034d538d484f362c9f.tar.gz
Added test case for bug #24573
Diffstat (limited to 'tests')
-rw-r--r--tests/lang/bug24573.phpt23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/lang/bug24573.phpt b/tests/lang/bug24573.phpt
new file mode 100644
index 0000000000..a7c8ac5ca5
--- /dev/null
+++ b/tests/lang/bug24573.phpt
@@ -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