]> granicus.if.org Git - php/commitdiff
add test
authorAntony Dovgal <tony2001@php.net>
Fri, 24 Oct 2008 20:17:50 +0000 (20:17 +0000)
committerAntony Dovgal <tony2001@php.net>
Fri, 24 Oct 2008 20:17:50 +0000 (20:17 +0000)
Zend/tests/bug46381.phpt [new file with mode: 0644]

diff --git a/Zend/tests/bug46381.phpt b/Zend/tests/bug46381.phpt
new file mode 100644 (file)
index 0000000..4d58e9f
--- /dev/null
@@ -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