Req #81493 [NEW]: shell_exec() should get a `int &$result_code = null` argument
| From: | divinity76 at gmail dot com | Date: | Fri, 01 Oct 2021 13:52:37 +0000 |
| Subject: | Req #81493 [NEW]: shell_exec() should get a `int &$result_code = null` argument | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-236961@lists.php.net to get a copy of this message | ||
From: divinity76 at gmail dot com
Operating system:
PHP version: Next Minor Version
Package: Unknown/Other Function
Bug Type: Feature/Change Request
Bug description:shell_exec() should get a
int &$result_code = null argument
Description:
------------
doing exactly the same as the $result_code argument for system() and
passthru() and exec()
Test script:
---------------
<?php
$result_code=null;
shell_exec(bin2hex(random_bytes(10))." 2>&1", $result_code);
var_dump($result_code);
Expected result:
----------------
platform-specific expected result, but at least on Linux one would
expect:
int(127)
Actual result:
--------------
PHP Warning: shell_exec() expects exactly 1 parameter, 2 given in
/home/hansh/foo3.php on line 3
NULL
--
Edit bug report at https://bugs.php.net/bug.php?id=81493&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=81493&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=81493&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=81493&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=81493&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=81493&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=81493&r=support
Expected behavior: https://bugs.php.net/fix.php?id=81493&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=81493&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=81493&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=81493&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81493&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=81493&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=81493&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=81493&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=81493&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=81493&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=81493&r=mysqlcfg