com php-src: Add tests verifying method calls on non-objects work inside eval(): Zend/tests/methods-on-non-objects-eval.phpt
| From: | Tjerk Anne Meesters | Date: | Mon, 28 Apr 2014 19:48:08 +0000 |
| Subject: | com php-src: Add tests verifying method calls on non-objects work inside eval(): Zend/tests/methods-on-non-objects-eval.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-82149@lists.php.net to get a copy of this message | ||
Commit: 7041ef44a6c18bb8d76dc5cf17d20ec00367d24b
Author: Timm Friebe <thekid@thekid.de> Mon, 28 Apr 2014 21:48:08 +0200
Parents: da1db5e688c46a044bc0745c86cc34cc4e9ab808
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7041ef44a6c18bb8d76dc5cf17d20ec00367d24b
Log:
Add tests verifying method calls on non-objects work inside eval()
Changed paths:
A Zend/tests/methods-on-non-objects-eval.phpt
Diff:
diff --git a/Zend/tests/methods-on-non-objects-eval.phpt
b/Zend/tests/methods-on-non-objects-eval.phpt
new file mode 100644
index 0000000..c961ed3
--- /dev/null
+++ b/Zend/tests/methods-on-non-objects-eval.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Indirect call inside eval to member function on non-object
+--FILE--
+<?php
+set_error_handler(function($code, $message) {
+ var_dump($code, $message);
+});
+
+$x= null;
+var_dump(eval('$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