Bug #71063 [Opn->Csd]: filter_input(INPUT_ENV, ..) does not work
Edit report at https://bugs.php.net/bug.php?id=71063&edit=1
ID: 71063
Updated by: reeze@php.net
Reported by: sander at hoentjen dot eu
Summary: filter_input(INPUT_ENV, ..) does not work
-Status: Open
+Status: Closed
Type: Bug
Package: Filter related
Operating System: Linux (Fedora)
PHP Version: 7.0.0
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of reeze
Revision: http://git.php.net/?p=php-src.git;a=commit;h=3427c122bf02488559ef5fdf0e9403396c30a5f1
Log: Fixed bug #71063 (filter_input(INPUT_ENV, ..) does not work)
Previous Comments:
------------------------------------------------------------------------
[2015-12-08 14:46:09] sander at hoentjen dot eu
Description:
------------
With PHP 7 it seems filter_input(INPUT_ENV, 'PATH') does not work anymore. It returns NULL
whereas previous PHP versions returned the same as $_ENV['PATH']
It is not just the PATH variable, the whole function filter_input_array(INPUT_ENV) returns NULL,
even though $_ENV is not empty.
variables_order is set to "EGPCS"
This looks similar to https://bugs.php.net/bug.php?id=52209
Test script:
---------------
var_dump($_ENV['PATH']); // to check if it really has data
var_dump(filter_input(INPUT_ENV, 'PATH')); // this returns NULL, but should return the
same as the previous command
Expected result:
----------------
string(59) "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin"
string(59) "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin"
Actual result:
--------------
string(59) "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin"
NULL
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71063&edit=1
Thread (2 messages)