check if Revision::getText() returned without an error
authorTim Starling <tstarling@users.mediawiki.org>
Thu, 19 Jan 2006 04:52:18 +0000 (04:52 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Thu, 19 Jan 2006 04:52:18 +0000 (04:52 +0000)
includes/DifferenceEngine.php

index 178e967..588f215 100644 (file)
@@ -325,6 +325,7 @@ CONTROL;
                        $difftext = $wgMemc->get( $key );
                        if ( $difftext ) {
                                wfIncrStats( 'diff_cache_hit' );
+                               $difftext .= "\n<!-- diff cache key $key -->\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;
        }