From: Kaldari Date: Mon, 28 Nov 2016 19:44:36 +0000 (-0800) Subject: Prevent fatal error if $wgCookieSetOnAutoblock is changed to false X-Git-Tag: 1.31.0-rc.0~4751 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=9ba7296687b76f1304de83597dc87c41ba300ad4;p=lhc%2Fweb%2Fwiklou.git Prevent fatal error if $wgCookieSetOnAutoblock is changed to false ... and user still has a block cookie set. Bug: T151097 Change-Id: I5a2fdc53250f629579428efbed39f6fb1f1531f3 --- 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 ); } } }