cvs: ZendEngine2 /tests bug46381.phpt

[email protected] ("Antony Dovgal")
Newsgroups php.zend-engine.cvs
Message-ID <cvstony20011224879470@cvsserver>
tony2001		Fri Oct 24 20:17:50 2008 UTC

  Modified files:              
    /ZendEngine2/tests	bug46381.phpt 
  Log:
  add test
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/bug46381.phpt?r1=1.1&r2=1.2&diff_format=u
Index: ZendEngine2/tests/bug46381.phpt
diff -u /dev/null ZendEngine2/tests/bug46381.phpt:1.2
--- /dev/null	Fri Oct 24 20:17:50 2008
+++ ZendEngine2/tests/bug46381.phpt	Fri Oct 24 20:17:50 2008
@@ -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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.