mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
standard: Fix error check for proc_open() command
zval_get_string() can never return NULL, you need to use the try version to get NULL. This is observable because the process will still spawn even if an exception had occurred. To fix this, use the try variant. Closes GH-20650.
This commit is contained in:
3
NEWS
3
NEWS
@@ -16,6 +16,9 @@ PHP NEWS
|
||||
- LDAP:
|
||||
. Fix memory leak in ldap_set_options(). (ndossche)
|
||||
|
||||
- Standard:
|
||||
. Fix error check for proc_open() command. (ndossche)
|
||||
|
||||
18 Dec 2025, PHP 8.3.29
|
||||
|
||||
- Core:
|
||||
|
||||
@@ -510,7 +510,7 @@ typedef struct _descriptorspec_item {
|
||||
} descriptorspec_item;
|
||||
|
||||
static zend_string *get_valid_arg_string(zval *zv, int elem_num) {
|
||||
zend_string *str = zval_get_string(zv);
|
||||
zend_string *str = zval_try_get_string(zv);
|
||||
if (!str) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user