From: aude Date: Mon, 22 Oct 2012 18:48:09 +0000 (+0000) Subject: check for null content in ApiParse.php X-Git-Tag: 1.31.0-rc.0~21910^2 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=89694e81a56974161623e8fe644a9f78fe15f58a;p=lhc%2Fweb%2Fwiklou.git check for null content in ApiParse.php Change-Id: I32b3c02163f2295f91b680e3a5636105960b971a --- diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php index 1a55d5a16b..870fba9a28 100644 --- a/includes/api/ApiParse.php +++ b/includes/api/ApiParse.php @@ -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() );