From 3e90b8b5eded19e4ab34657fc101470b0c1d818f Mon Sep 17 00:00:00 2001 From: Reedy Date: Sat, 28 Apr 2012 01:33:24 +0100 Subject: [PATCH] Attempt at fixing "Fatal error: Call to a member function getText() on a non-object in /usr/local/apache/common-local/php-1.20wmf1/includes/api/ApiParse.php on line 209" $page->getParserOutput() can apparently return false, so seems a reasonable starting point Change-Id: I5ee1996f19405d4c854900376a3588fb1b7bbb66 --- includes/api/ApiParse.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php index 141f779372..c2bdeb1f5c 100644 --- a/includes/api/ApiParse.php +++ b/includes/api/ApiParse.php @@ -328,6 +328,9 @@ class ApiParse extends ApiBase { // Try the parser cache first // getParserOutput will save to Parser cache if able $pout = $page->getParserOutput( $popts ); + if ( !$pout ) { + $this->dieUsage( "There is no revision ID {$page->getLatest()}", 'missingrev' ); + } if ( $getWikitext ) { $this->text = $page->getRawText(); } -- 2.20.1