From e214ea91df50c160738cbc6ae5972c4a19288f2c Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Sun, 14 Aug 2011 09:37:23 +0000 Subject: [PATCH] ApiParamInfo: if no help URLs are available, return an empty array instead of array with one empty element --- includes/api/ApiParamInfo.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/api/ApiParamInfo.php b/includes/api/ApiParamInfo.php index 6ba115e431..259443a92c 100644 --- a/includes/api/ApiParamInfo.php +++ b/includes/api/ApiParamInfo.php @@ -117,6 +117,9 @@ class ApiParamInfo extends ApiBase { } $retval['helpurls'] = (array)$obj->getHelpUrls(); + if ( isset( $retval['helpurls'][0] ) && $retval['helpurls'][0] === false ) { + $retval['helpurls'] = array(); + } $result->setIndexedTagName( $retval['helpurls'], 'helpurl' ); $retval['allexamples'] = $examples; -- 2.20.1