Bug #71063 [NEW]: filter_input(INPUT_ENV, ..) does not work

From: Date: Tue, 08 Dec 2015 14:46:10 +0000
Subject: Bug #71063 [NEW]: filter_input(INPUT_ENV, ..) does not work
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-197698@lists.php.net to get a copy of this message
From:             sander at hoentjen dot eu
Operating system: Linux (Fedora)
PHP version:      7.0.0
Package:          Filter related
Bug Type:         Bug
Bug description:filter_input(INPUT_ENV, ..) does not work

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 bug report at https://bugs.php.net/bug.php?id=71063&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=71063&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=71063&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=71063&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=71063&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=71063&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=71063&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=71063&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=71063&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=71063&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=71063&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=71063&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=71063&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=71063&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71063&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=71063&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=71063&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=71063&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71063&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=71063&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=71063&r=mysqlcfg



Thread (2 messages)

« previous php.bugs (#197698) next »