summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2008-10-24 20:17:01 +0000
committerAntony Dovgal <tony2001@php.net>2008-10-24 20:17:01 +0000
commit73f81e9df67c8d19d2fc6f4404cfd114ef6030d8 (patch)
tree1ab57615be4aa65792d327728cf5b14870275890
parentcc9a286005d88547cc93749873c5c4655d0003bd (diff)
downloadphp-git-73f81e9df67c8d19d2fc6f4404cfd114ef6030d8.tar.gz
add test
-rw-r--r--Zend/tests/bug46381.phpt19
1 files changed, 19 insertions, 0 deletions
diff --git a/Zend/tests/bug46381.phpt b/Zend/tests/bug46381.phpt
new file mode 100644
index 0000000000..4d58e9fdf3
--- /dev/null
+++ b/Zend/tests/bug46381.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #46381 (wrong $this passed to internal methods causes segfault)
+--SKIPIF--
+<?php if (!extension_loaded("spl")) die("skip SPL is no available"); ?>
+--FILE--
+<?php
+
+class test {
+ public function test() {
+ return ArrayIterator::current();
+ }
+}
+$test = new test();
+$test->test();
+
+echo "Done\n";
+?>
+--EXPECTF--
+Fatal error: Non-static method ArrayIterator::current() cannot be called statically, assuming $this from incompatible context in %s on line %d