summaryrefslogtreecommitdiff
path: root/Zend/tests/methods-on-non-objects-args-catch.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/methods-on-non-objects-args-catch.phpt')
-rw-r--r--Zend/tests/methods-on-non-objects-args-catch.phpt18
1 files changed, 18 insertions, 0 deletions
diff --git a/Zend/tests/methods-on-non-objects-args-catch.phpt b/Zend/tests/methods-on-non-objects-args-catch.phpt
new file mode 100644
index 0000000000..2dd54cb65d
--- /dev/null
+++ b/Zend/tests/methods-on-non-objects-args-catch.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Catch method calls on non-objects raise recoverable errors
+--FILE--
+<?php
+set_error_handler(function($code, $message) {
+ var_dump($code, $message);
+});
+
+$x= null;
+var_dump($x->method(1, 2, 3));
+echo "Alive\n";
+?>
+--EXPECTF--
+
+int(4096)
+string(%d) "Call to a member function method() on a non-object"
+NULL
+Alive