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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2021 The PHP Group
All rights reserved.
Last updated: Mon Aug 02 21:01:24 2021 UTC