From 9ba7296687b76f1304de83597dc87c41ba300ad4 Mon Sep 17 00:00:00 2001 From: Kaldari Date: Mon, 28 Nov 2016 11:44:36 -0800 Subject: [PATCH] Prevent fatal error if $wgCookieSetOnAutoblock is changed to false ... and user still has a block cookie set. Bug: T151097 Change-Id: I5a2fdc53250f629579428efbed39f6fb1f1531f3 --- includes/user/User.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/user/User.php b/includes/user/User.php index 789c55c00e..82d8806f75 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -1649,7 +1649,7 @@ class User implements IDBAccessObject { // If the block is not valid, clear the block cookie (but don't delete it, // because it needs to be cleared from LocalStorage as well and an empty string // value is checked for in the mediawiki.user.blockcookie module). - $block->setCookie( $this->getRequest()->response(), true ); + $tmpBlock->setCookie( $this->getRequest()->response(), true ); } } } -- 2.20.1