Check for result size failure in ApiQuery
authorBrad Jorsch <bjorsch@wikimedia.org>
Fri, 1 Aug 2014 16:23:09 +0000 (12:23 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Fri, 1 Aug 2014 16:26:49 +0000 (12:26 -0400)
commitd0e16713bcf0a065d22caad2125cc25d4d9245ef
treeef7684056b8de16630c90707763bf8c974e8c1fe
parent4c972c834b8e5247c73a6f0e2eda6e7799d782d4
Check for result size failure in ApiQuery

If someone sets $wgAPIMaxResultSize crazily small and then queries a
large number of pages, it can cause ApiQuery to fail to populate the
'pages' node. Then submodules might add data to the node, leading to
errors from the XML formatter (or bogus output from other formatters).

While that particular failure mode is probably going away soon, it's
still good to catch the error situation.

Bug: 68989
Change-Id: If0b2eda421fd86dd7acc4fe48cec47741e214221
includes/api/ApiQuery.php