From 89694e81a56974161623e8fe644a9f78fe15f58a Mon Sep 17 00:00:00 2001 From: aude Date: Mon, 22 Oct 2012 18:48:09 +0000 Subject: [PATCH] check for null content in ApiParse.php Change-Id: I32b3c02163f2295f91b680e3a5636105960b971a --- includes/api/ApiParse.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() ); -- 2.20.1