diff options
-rw-r--r-- | Zend/tests/bug54372.phpt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Zend/tests/bug54372.phpt b/Zend/tests/bug54372.phpt new file mode 100644 index 0000000000..e2e9911f81 --- /dev/null +++ b/Zend/tests/bug54372.phpt @@ -0,0 +1,23 @@ +--TEST-- +Bug #54372 (Crash accessing global object itself returned from its __get() handle) +--FILE-- +<?php +class test_class +{ + public function __get($name) + { + return $this; + } + + public function b() + { + echo "ok\n"; + } +} + +global $test3; +$test3 = new test_class(); +$test3->a->b(); +?> +--EXPECT-- +ok |