ApiParamInfo: if no help URLs are available, return an empty array instead of array...
authorMax Semenik <maxsem@users.mediawiki.org>
Sun, 14 Aug 2011 09:37:23 +0000 (09:37 +0000)
committerMax Semenik <maxsem@users.mediawiki.org>
Sun, 14 Aug 2011 09:37:23 +0000 (09:37 +0000)
includes/api/ApiParamInfo.php

index 6ba115e..259443a 100644 (file)
@@ -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;