Page MenuHomePhabricator

Specifying blank action parameter triggers WMF Error instead of API Error
Closed, ResolvedPublic

Description

Author: overlordq

Description:
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).


Version: unspecified
Severity: trivial
URL: http://en.wikipedia.org/w/api.php?action=

Attached:

Details

Reference
bz14968

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:11 PM
bzimport set Reference to bz14968.