From 43f3d250f45e095150d12185f9ac8bfaad27d1cc Mon Sep 17 00:00:00 2001 From: Timm Friebe Date: Sun, 5 Oct 2014 14:27:21 +0200 Subject: Add tests verifying calls work inside echo, concatenation and array access --- Zend/tests/methods-on-non-objects-array-access.phpt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 Zend/tests/methods-on-non-objects-array-access.phpt (limited to 'Zend/tests/methods-on-non-objects-array-access.phpt') diff --git a/Zend/tests/methods-on-non-objects-array-access.phpt b/Zend/tests/methods-on-non-objects-array-access.phpt new file mode 100755 index 0000000000..be87457c6c --- /dev/null +++ b/Zend/tests/methods-on-non-objects-array-access.phpt @@ -0,0 +1,18 @@ +--TEST-- +Catch method calls on non-objects inside array access +--FILE-- + 'OK']; +var_dump($a[$x->method()]); +echo "Alive\n"; +?> +--EXPECTF-- +int(4096) +string(%d) "Call to a member function method() on null" +string(2) "OK" +Alive \ No newline at end of file -- cgit v1.2.1