Last modified: 2008-07-30 07:24:21 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 T16968, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 14968 - Specifying blank action parameter triggers WMF Error instead of API Error
Specifying blank action parameter triggers WMF Error instead of API Error
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Normal trivial (vote)
: ---
Assigned To: Roan Kattouw
http://en.wikipedia.org/w/api.php?act...
: patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-29 10:06 UTC by OverlordQ
Modified: 2008-07-30 07:24 UTC (History)
1 user (show)

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


Attachments
Rough fix (519 bytes, patch)
2008-07-29 10:06 UTC, OverlordQ
Details

Description OverlordQ 2008-07-29 10:06:48 UTC
Created attachment 5102 [details]
Rough fix

If you report this error to the Wikimedia System Administrators, please include the details below.

==
PHP fatal error in /usr/local/apache/common-local/php-1.5/includes/api/ApiMain.php line 351:
Class name must be a valid object or a string
==

When passed a empty action parameter and extractRequestParams is called on line 345 in ApiMain, the $params['action'] gets set to an empty array, instead of the one string value it expects.

Almost guaranteed there's a better place to fix this (getParameterFromSettings?), but that code is scary and this works (as far as I can test).
Comment 1 Victor Vasiliev 2008-07-30 07:24:21 UTC
Fixed in r38219.

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


Navigation
Links