diff options
author | Timm Friebe <thekid@thekid.de> | 2014-04-28 21:48:08 +0200 |
---|---|---|
committer | Timm Friebe <thekid@thekid.de> | 2014-04-28 21:48:08 +0200 |
commit | 7041ef44a6c18bb8d76dc5cf17d20ec00367d24b (patch) | |
tree | 8315b3cfaaad993533c8caf8f2bab9adc1ec15d2 | |
parent | da1db5e688c46a044bc0745c86cc34cc4e9ab808 (diff) | |
download | php-git-7041ef44a6c18bb8d76dc5cf17d20ec00367d24b.tar.gz |
Add tests verifying method calls on non-objects work inside eval()
-rw-r--r-- | Zend/tests/methods-on-non-objects-eval.phpt | 18 |
1 files changed, 18 insertions, 0 deletions
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 0000000000..c961ed385f --- /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 |