Return '' to avoid vague cryptic error message when a user lacks permissions
authorAaron Schulz <aaron@users.mediawiki.org>
Mon, 31 Mar 2008 18:01:39 +0000 (18:01 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Mon, 31 Mar 2008 18:01:39 +0000 (18:01 +0000)
includes/DifferenceEngine.php

index 0671fa0..ee87022 100644 (file)
@@ -426,9 +426,9 @@ CONTROL;
                wfProfileIn( $fname );
                // Check if the diff should be hidden from this user
                if ( $this->mOldRev && !$this->mOldRev->userCan(Revision::DELETED_TEXT) ) {
-                       return false;
+                       return '';
                } else if ( $this->mNewRev && !$this->mNewRev->userCan(Revision::DELETED_TEXT) ) {
-                       return false;
+                       return '';
                }
                // Cacheable?
                $key = false;