check for null content in ApiParse.php
authoraude <aude.wiki@gmail.com>
Mon, 22 Oct 2012 18:48:09 +0000 (18:48 +0000)
committeraude <aude.wiki@gmail.com>
Mon, 22 Oct 2012 18:48:09 +0000 (18:48 +0000)
Change-Id: I32b3c02163f2295f91b680e3a5636105960b971a

includes/api/ApiParse.php

index 1a55d5a..870fba9 100644 (file)
@@ -353,7 +353,7 @@ class ApiParse extends ApiBase {
        private function getParsedContent( WikiPage $page, $popts, $pageId = null, $getWikitext = false ) {
                $this->content = $page->getContent( Revision::RAW ); //XXX: really raw?
 
-               if ( $this->section !== false ) {
+               if ( $this->section !== false && $this->content !== null ) {
                        $this->content = $this->getSectionContent(
                                $this->content,
                                !is_null( $pageId ) ? 'page id ' . $pageId : $page->getTitle()->getText() );