summaryrefslogtreecommitdiff
path: root/Zend/tests/bug46381.phpt
blob: ce4e399284b4b4185b701cae863d402b7517d570 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
Bug #46381 (wrong $this passed to internal methods causes segfault)
--FILE--
<?php

class test {
	public function method() {
		return ArrayIterator::current();
	}
}
$test = new test();
$test->method();

echo "Done\n";
?>
--EXPECTF--
Fatal error: Uncaught Error: Non-static method ArrayIterator::current() cannot be called statically in %s:%d
Stack trace:
#0 %s(%d): test->method()
#1 {main}
  thrown in %s on line %d