php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44779 filter returns NULL in CLI when it shouldn't
Submitted: 2008-04-18 17:45 UTC Modified: 2008-07-24 09:13 UTC
From: philip@php.net Assigned:
Status: Closed Package: Filter related
PHP Version: 5.3CVS-2008-04-18 (snap) OS: Mac
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: philip@php.net
New email:
PHP Version: OS:

 

 [2008-04-18 17:45 UTC] philip@php.net
Description:
------------
The filter extension appears to have issues with CLI. I have not fully tested it but will provide examples below to demonstrate the problem.

These tests use INPUT_SERVER, but others may be affected. Note: The same code is working correctly for me in mod_php.

Reproduce code:
---------------
philip$ cat > foo.php
<?php
var_dump( filter_input(INPUT_SERVER, 'PHP_SELF') );
var_dump( $_SERVER['PHP_SELF'] );
^C
philip$ php foo.php 
NULL
string(7) "foo.php"

philip$ php -r 'var_dump($_SERVER["PHP_SELF"]);'
string(1) "-"
philip$ php -r 'var_dump( filter_input(INPUT_SERVER, "PHP_SELF"));'
NULL



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-24 09:13 UTC] lbarnaud@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC