diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index f235fee967fa8..d2288cb78e8e3 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -108,11 +108,6 @@ static php_process_env_t _php_array_to_envp(zval *environment, int is_persistent ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(environment), key, element) { str = zval_get_string(element); - if (ZSTR_LEN(str) == 0) { - zend_string_release(str); - continue; - } - sizeenv += ZSTR_LEN(str) + 1; if (key && ZSTR_LEN(key)) { diff --git a/ext/standard/tests/general_functions/proc_open03.inc b/ext/standard/tests/general_functions/proc_open03.inc new file mode 100755 index 0000000000000..a02c827cc11d1 --- /dev/null +++ b/ext/standard/tests/general_functions/proc_open03.inc @@ -0,0 +1,4 @@ + +--FILE-- + 'abc', 'bar' => ''); +$process = proc_open($cmd, $descriptor, $pipes, $cwd, $env); +proc_close($process); +?> +--EXPECT-- +string(3) "abc" +string(0) ""