From bc79cb0f6fd9bee6bf1ee5cd583883e937f407e9 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 14 May 2008 23:42:15 +0000 Subject: [PATCH] Trigger load of user data in User::getBlockStatus() before we start changing member variables. Otherwise something ends up stomping on $this->mBlockedby when things get lazy-loaded later, causing false positive block hits due to -1 !== 0. Probably session-related... Nothing should be overwriting mBlockedby, surely? This was giving me blank "you are blocked" messages.... but only when doing *section edits on SSL*, not regular edits, nor section edits on non-SSL wikipedia. Weeeeeeird --- includes/User.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/includes/User.php b/includes/User.php index 9e71e2e5ea..9ec8a34c39 100644 --- a/includes/User.php +++ b/includes/User.php @@ -1002,6 +1002,13 @@ class User { wfProfileIn( __METHOD__ ); wfDebug( __METHOD__.": checking...\n" ); + // Initialize data... + // Otherwise something ends up stomping on $this->mBlockedby when + // things get lazy-loaded later, causing false positive block hits + // due to -1 !== 0. Probably session-related... Nothing should be + // overwriting mBlockedby, surely? + $this->load(); + $this->mBlockedby = 0; $this->mHideName = 0; $ip = wfGetIP(); -- 2.20.1