call_user_func(_array): Don't abort on reference warning#2088
call_user_func(_array): Don't abort on reference warning#2088nikic wants to merge 1 commit intophp:masterfrom
Conversation
Change zend_call_function() to not abort the call if a non-reference is passed to a reference argument. The usual warning will still be thrown, but the call will proceed as usual.
| $a->setStub('<?php | ||
| try { | ||
| Phar::webPhar("test.phar", "/index.php", null, array(), "sort"); | ||
| Phar::webPhar("test.phar", "/index.php", null, array(), function() { throw new Exception; }); |
There was a problem hiding this comment.
why did you have to change PHAR tests?
There was a problem hiding this comment.
They were testing calls where zend_is_callable succeeds, but zend_call_function fails. There's no good way to test this anymore, so I switched to throwing an exception -- it's not quite the same, but similar.
|
Please, commit this into PHP-7.1 and above. |
|
I'm currently traveling, don't have a dev setup here. Can you please merge On Aug 22, 2016 08:59, "Dmitry Stogov" [email protected] wrote:
|
|
Has been merged as 906456c. |
Change zend_call_function() to not abort the call if a non-reference
is passed to a reference argument. The usual warning will still be
thrown, but the call will proceed as usual.