From 7404ba829aed5b961a4fa2a243c27c72f532d94a Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Thu, 19 Jan 2006 04:52:18 +0000 Subject: [PATCH] check if Revision::getText() returned without an error --- includes/DifferenceEngine.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/includes/DifferenceEngine.php b/includes/DifferenceEngine.php index 178e967474..588f215a59 100644 --- a/includes/DifferenceEngine.php +++ b/includes/DifferenceEngine.php @@ -325,6 +325,7 @@ CONTROL; $difftext = $wgMemc->get( $key ); if ( $difftext ) { wfIncrStats( 'diff_cache_hit' ); + $difftext .= "\n\n"; return $difftext; } } @@ -479,9 +480,15 @@ CONTROL; } if ( $this->mOldRev ) { $this->mOldtext = $this->mOldRev->getText(); + if ( $this->mOldtext === false ) { + return false; + } } if ( $this->mNewRev ) { $this->mNewtext = $this->mNewRev->getText(); + if ( $this->mNewtext === false ) { + return false; + } } return true; } -- 2.20.1