From eb9359b3679ccb4e1fa6e06ffe739bb9fdb04bec Mon Sep 17 00:00:00 2001 From: matason Date: Mon, 20 Jun 2016 23:02:33 +0100 Subject: [PATCH] Fixed bug #71868 --- ext/standard/proc_open.c | 5 ----- .../tests/general_functions/proc_open03.inc | 4 ++++ .../tests/general_functions/proc_open03.phpt | 21 +++++++++++++++++++ 3 files changed, 25 insertions(+), 5 deletions(-) create mode 100755 ext/standard/tests/general_functions/proc_open03.inc create mode 100644 ext/standard/tests/general_functions/proc_open03.phpt 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) ""