Bug #71868 [Opn]: Environment variables with no value are filtered out by proc_open()
| From: | enrico dot stahn at gmail dot com | Date: | Mon, 21 Mar 2016 14:13:17 +0000 |
| Subject: | Bug #71868 [Opn]: Environment variables with no value are filtered out by proc_open() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-199994@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71868&edit=1
ID: 71868
User updated by: enrico dot stahn at gmail dot com
Reported by: enrico dot stahn at gmail dot com
Summary: Environment variables with no value are filtered out
by proc_open()
Status: Open
Type: Bug
Package: Program Execution
Operating System: Debian
PHP Version: 5.6.19
Block user comment: N
Private report: N
New Comment:
https://github.com/symfony/symfony/issues/18170#issuecomment-199225778
Previous Comments:
------------------------------------------------------------------------
[2016-03-21 14:12:09] enrico dot stahn at gmail dot com
Description:
------------
Empty environment variables passed to proc_open are filtered out.
Test script:
---------------
<?php
// process.php
$env = ['FOO' => 'abc', 'BAR' => ''];
$pipes = [];
$process = proc_open('./env.php', [], $pipes,
pwd, $env);
proc_close($process);
#!/usr/bin/php
<?php
// env.php
var_dump($_SERVER['FOO']);
var_dump($_SERVER['BAR']);
php process.php will output:
string(3) "abc"
PHP Notice: Undefined index: BAR in /Users/kuba/Projects/symfony/issues/env.php on line 6
NULL
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71868&edit=1