]> granicus.if.org Git - php/commitdiff
Also fix signature for passthru
authorTyson Andre <tysonandre775@hotmail.com>
Sun, 25 Aug 2019 15:02:28 +0000 (11:02 -0400)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 26 Aug 2019 09:13:26 +0000 (11:13 +0200)
Backported from a1a8d144854acb1c891cf0c21abb0f612b1d8de7
https://www.php.net/manual/en/function.passthru.php#refsect1-function.passthru-returnvalues

`passthru()` is false with invalid args
`passthru('command')` is null.

ext/opcache/Optimizer/zend_func_info.c

index 7f081047431333cad146a64f2c7a4cd8a02f0062..7395540beffa357307be2b4e8f8b5bc82836f7bd 100644 (file)
@@ -404,7 +404,7 @@ static const func_info_t func_infos[] = {
        F1("system",                       MAY_BE_FALSE | MAY_BE_STRING),
        F1("escapeshellcmd",               MAY_BE_NULL | MAY_BE_STRING),
        F1("escapeshellarg",               MAY_BE_NULL | MAY_BE_STRING),
-       F1("passthru",                     MAY_BE_FALSE | MAY_BE_STRING),
+       F1("passthru",                     MAY_BE_NULL | MAY_BE_FALSE),
        F1("shell_exec",                   MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
 #ifdef PHP_CAN_SUPPORT_PROC_OPEN
        F1("proc_open",                    MAY_BE_FALSE | MAY_BE_RESOURCE),