Expand the default watchlist time from 3 to 7 days
[lhc/web/wiklou.git] / includes / Revision.php
index 89a58f3..d6ff384 100644 (file)
@@ -887,7 +887,7 @@ class Revision implements IDBAccessObject {
         *   Revision::FOR_PUBLIC       to be displayed to all users
         *   Revision::FOR_THIS_USER    to be displayed to $user
         *   Revision::RAW              get the text regardless of permissions
-        * @param User $user User object to check for, only if FOR_THIS_USER is passed
+        * @param User|null $user User object to check for, only if FOR_THIS_USER is passed
         *   to the $audience parameter
         * @since 1.21
         * @return Content|null
@@ -1074,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 );
        }