php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67942 $_POST silently drops empty fields
Submitted: 2014-09-01 06:37 UTC Modified: 2014-09-01 15:18 UTC
From: robinhood70 at live dot ca Assigned:
Status: Not a bug Package: *URL Functions
PHP Version: 5.4.32 OS: Linux (various)
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: robinhood70 at live dot ca
New email:
PHP Version: OS:

 

 [2014-09-01 06:37 UTC] robinhood70 at live dot ca
Description:
------------
Sending GET and POST requests such as:
http://mysite/script.php?param1=value1&boolvalue2&param3=value3

$_GET returns param1, boolvalue2, and param3.
file_get_contents("php://input") also returns all three.

$_POST returns param1 and param3, but boolvalue2 is ignored.


Expected result:
----------------
Results should be the same, regardless of method.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-09-01 07:36 UTC] fa@php.net
-Status: Open +Status: Feedback
 [2014-09-01 07:36 UTC] fa@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

From a very quick testing I either misunderstood you or could not reproduce it.
 [2014-09-01 14:58 UTC] johannes@php.net
-Status: Feedback +Status: Not a bug
 [2014-09-01 14:58 UTC] johannes@php.net
This is expected behavior. You need a = at least. We don't plan to change this due to BC issues as some applications assume those to be ignored by PHP :/
 [2014-09-01 15:18 UTC] robinhood70 at live dot ca
Interesting to know. Thanks, Johannes!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 11:01:30 2024 UTC