summaryrefslogtreecommitdiff
path: root/Zend/tests/methods-on-non-objects.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/methods-on-non-objects.phpt')
-rw-r--r--Zend/tests/methods-on-non-objects.phpt12
1 files changed, 12 insertions, 0 deletions
diff --git a/Zend/tests/methods-on-non-objects.phpt b/Zend/tests/methods-on-non-objects.phpt
new file mode 100644
index 0000000000..01031b8b1d
--- /dev/null
+++ b/Zend/tests/methods-on-non-objects.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Method calls on non-objects raise recoverable errors
+--FILE--
+<?php
+
+$x= null;
+$x->method();
+echo "Should not get here!\n";
+?>
+--EXPECTF--
+
+Catchable fatal error: Call to a member function method() on null in %s on line %d