ID: 49184 Updated by: j...@php.net Reported By: m dot kurzyna at crystalpoint dot pl -Status: Open +Status: Verified Bug Type: Filter related -Operating System: Linux +Operating System: * -PHP Version: 5.3.0 +PHP Version: 5.*, 6 (2009-08-07) New Comment:
This is quite strange, propably caused by bad design of the filter extension. Previous Comments: ------------------------------------------------------------------------ [2009-08-06 21:48:51] m dot kurzyna at crystalpoint dot pl Description: ------------ This is very similar to #44779, however my report regards variables set as environment variables when running CLI. A variable is visible in $_SERVER but INPUT_SERVER returns NULL. Setting via SetEnv in apache and when running as mod_php is fine. Reproduce code: --------------- <?php var_dump( filter_input(INPUT_SERVER,'ENV_NAME',FILTER_SANITIZE_STRING), $_SERVER['ENV_NAME'] ); ?> Expected result: ---------------- $ ENV_NAME=var php /tmp/t.php string(3) "var" string(3) "var" Actual result: -------------- $ ENV_NAME=var php /tmp/t.php NULL string(3) "var" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=49184&edit=1