Followup r92430 per CR, like r94448
authorSam Reed <reedy@users.mediawiki.org>
Mon, 15 Aug 2011 18:56:37 +0000 (18:56 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Mon, 15 Aug 2011 18:56:37 +0000 (18:56 +0000)
includes/SpecialPage.php
includes/api/ApiParamInfo.php

index ec257b9..43ade67 100644 (file)
@@ -545,7 +545,7 @@ class SpecialPage {
                if ( $this->userCanExecute( $this->getUser() ) ) {
                        $func = $this->mFunction;
                        // only load file if the function does not exist
-                       if(!is_callable($func) and $this->mFile) {
+                       if( !is_callable($func) && $this->mFile ) {
                                require_once( $this->mFile );
                        }
                        $this->outputHeader();
index 259443a..ad380c5 100644 (file)
@@ -123,6 +123,9 @@ class ApiParamInfo extends ApiBase {
                $result->setIndexedTagName( $retval['helpurls'], 'helpurl' );
 
                $retval['allexamples'] = $examples;
+               if ( isset( $retval['allexamples'][0] ) && $retval['allexamples'][0] === false ) {
+                       $retval['allexamples'] = array();
+               }
                $result->setIndexedTagName( $retval['allexamples'], 'example' );
 
                $retval['parameters'] = array();