GitInfo: Don't try shelling out if it's disabled
[lhc/web/wiklou.git] / includes / Revision.php
index b9a03f5..dc15f97 100644 (file)
@@ -1038,7 +1038,18 @@ class Revision implements IDBAccessObject {
                        ? SqlBlobStore::makeAddressFromTextId( $row->old_id )
                        : null;
 
-               return self::getBlobStore( $wiki )->expandBlob( $text, $flags, $cacheKey );
+               $revisionText = self::getBlobStore( $wiki )->expandBlob( $text, $flags, $cacheKey );
+
+               if ( $revisionText === false ) {
+                       if ( isset( $row->old_id ) ) {
+                               wfLogWarning( __METHOD__ . ": Bad data in text row {$row->old_id}! " );
+                       } else {
+                               wfLogWarning( __METHOD__ . ": Bad data in text row! " );
+                       }
+                       return false;
+               }
+
+               return $revisionText;
        }
 
        /**
@@ -1063,6 +1074,11 @@ class Revision implements IDBAccessObject {
         * @return string|bool Decompressed text, or false on failure
         */
        public static function decompressRevisionText( $text, $flags ) {
+               if ( $text === false ) {
+                       // Text failed to be fetched; nothing to do
+                       return false;
+               }
+
                return self::getBlobStore()->decompressData( $text, $flags );
        }