Last modified: 2014-09-05 11:00:36 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T72260, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 70260 - POST boolean fields ignored without =
POST boolean fields ignored without =
Status: NEW
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.24rc
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-01 15:49 UTC by Robert Morley
Modified: 2014-09-05 11:00 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Robert Morley 2014-09-01 15:49:47 UTC
WebRequest.php populates its data from $_POST + $_GET. The two methods, however, don't behave the same when it comes to form data, so flag values are dropped unless you add the equals sign with an empty value. For example:

http://rob-centos/uesp/api.php?action=edit&title=Sandbox&text=Test&summary=Test&minor&token=<token>

...results in a normal edit, despite what you might expect, while...

http://rob-centos/uesp/api.php?action=edit&title=Sandbox&text=Test&summary=Test&minor=&token=<token>

...results in a minor edit, as expected. Note that this does NOT apply to GET requests. API:Query's "redirect" flag works just fine, for example.

As I indicated at https://bugs.php.net/bug.php?id=67942 , file_get_contents("php://input") can be used to get the complete set of values, if desired. Alternatively, we can simply change the MediaWiki documentation to reflect the oddity (as I've done at m:API:Edit).

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links