php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27740 $_GET empty if a single URL-specified variable is empty
Submitted: 2004-03-28 07:40 UTC Modified: 2004-03-28 08:01 UTC
From: bugs dot php dot net at sig11 dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.3.5 OS: Solaris 8
Private report: No CVE-ID: None
 [2004-03-28 07:40 UTC] bugs dot php dot net at sig11 dot com
Description:
------------
With PHP running as a CGI under Apache2 and suPHP (http://suphp.org)

If you have a URL like:

http://blah.com/blah.php?transform=yes&sortby=

The ENTIRE $_GET array will be empty. 

But if you have:

http://blah.com/blah.php?transform=yes

It will work fine.


It would appear having emtpy CGI GET variables screws up PHP.

Reproduce code:
---------------
//For the script blah.php?transform=yes&sortby=

echo "transform: $_GET['transform']";

Expected result:
----------------
transform: yes

Actual result:
--------------
<nothing>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-28 08:01 UTC] bugs dot php dot net at sig11 dot com
Actually this turned out to be a bug in suPHP.

See this page for a fix:

http://lists.marsching.biz/pipermail/suphp/2004-March/000624.html
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 22:01:31 2024 UTC