Bug #71063 [Opn->Csd]: filter_input(INPUT_ENV, ..) does not work

From: Date: Tue, 08 Dec 2015 16:10:24 +0000
Subject: Bug #71063 [Opn->Csd]: filter_input(INPUT_ENV, ..) does not work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-197703@lists.php.net to get a copy of this message
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)

« previous php.bugs (#197703) next »