From:             troublegum at woltlab dot de
Operating system: Linux
PHP version:      4.3.6
PHP Bug Type:     Scripting Engine problem
Bug description:  Query String ending with "=" leads to an empty $_GET array

Description:
------------
An Query String with "=" at the end deletes all other GET variables (empty
$_GET array).
Seems to be related to the following bugs, but as far as I can see this
server does not run Apache2 and suPHP (?).
http://bugs.php.net/bug.php?id=27740
http://bugs.php.net/bug.php?id=27861
---
'./configure' '--prefix=/opt/php-4.3.6' '--enable-bcmath' '--with-bz2'
'--enable-force-cgi-redirect' '--enable-fastcgi' '--enable-discard-path'
'--with-layout=GNU' '--with-config-file-path=/opt/php-4.3.6/etc'
'--enable-calendar' '--with-curl' '--with-curlwrappers' '--enable-dbase'
'--enable-ftp' '--with-gettext' '-enable-exif' '--with-gd'
'--with-imap=/opt/imap-2004' '--with-imap-ssl=/usr' '--with-mime-magic'
'--with-mysql' '--with-ncurses' '--with-openssl=/usr' '--with-zip'
'--with-zlib' '--enable-dba=shared' '--with-db4' '--with-mssql'
---
Server API: CGI/FastCGI
magic_quotes_gpc = On
register_argc_argv = On
register_globals = On
variables_order = EGPCS
--- 
This problem occured on three of our client's server.
I can provide the complete output of phpinfo() if needed.
---

Reproduce code:
---------------
Open get.php?key=val&foo= in your browser.
Notice the "=" at the end.
-- get.php --
<?php
var_dump($_GET);
?>

Expected result:
----------------
array(2) {
  ["key"]=>
  string(3) "val"
  ["foo"]=>
  string(0) ""
}

Actual result:
--------------
array(0) {
}

-- 
Edit bug report at http://bugs.php.net/?id=28585&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28585&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28585&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=28585&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=28585&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=28585&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=28585&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=28585&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=28585&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=28585&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=28585&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=28585&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=28585&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28585&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=28585&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=28585&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=28585&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28585&r=float

Reply via email to