Page MenuHomePhabricator

action=query&list=allpages&apprtype&apprlevel= - Ungracefully failing
Closed, ResolvedPublic

Description

http://en.wikipedia.org/w/api.php?action=query&list=allpages&apprtype&apprlevel=

<?xml version="1.0"?>
<api>

<error code="internal_api_error_MWException" info="Exception Caught: Database::makeList: empty input">

#0 /usr/local/apache/common-local/php-1.5/includes/db/Database.php(1024): Database->makeList(Array, 1)
#1 /usr/local/apache/common-local/php-1.5/includes/db/Database.php(981): Database->selectSQLText(Array, Array, Array, 'ApiQueryAllpage...', Array, Array)
#2 /usr/local/apache/common-local/php-1.5/includes/api/ApiQueryBase.php(214): Database->select(Array, Array, Array, 'ApiQueryAllpage...', Array, Array)
#3 /usr/local/apache/common-local/php-1.5/includes/api/ApiQueryAllpages.php(125): ApiQueryBase->select('ApiQueryAllpage...')
#4 /usr/local/apache/common-local/php-1.5/includes/api/ApiQueryAllpages.php(43): ApiQueryAllpages->run()
#5 /usr/local/apache/common-local/php-1.5/includes/api/ApiQuery.php(211): ApiQueryAllpages->execute()
#6 /usr/local/apache/common-local/php-1.5/includes/api/ApiMain.php(422): ApiQuery->execute()
#7 /usr/local/apache/common-local/php-1.5/includes/api/ApiMain.php(258): ApiMain->executeAction()
#8 /usr/local/apache/common-local/php-1.5/includes/api/ApiMain.php(242): ApiMain->executeActionWithErrorHandling()
#9 /usr/local/apache/common-local/php-1.5/api.php(77): ApiMain->execute()
#10 /usr/local/apache/common-local/live-1.5/api.php(3): require('/usr/local/apac...')
#11 {main}

</error>
</api>

Shouldnt it really fail more gracefully? (obv, the query string is wrong)

Cheers

Sam


Version: 1.13.x
Severity: enhancement

Details

Reference
bz15706

Event Timeline

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

(In reply to comment #0)

http://en.wikipedia.org/w/api.php?action=query&list=allpages&apprtype&apprlevel=

Shouldnt it really fail more gracefully? (obv, the query string is wrong)

It shouldn't accept empty values for one of these parameters. I'll look into this.

Fixed in r41255. Empty values for either of these parameters are now silently ignored (i.e. treated as if the parameter were not set).