From cbdb2ce36423615852734b9bffbe5240fb02a631 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 10 May 2014 13:19:58 +0200 Subject: [PATCH] Remove isset() check for $wgLocalTZoffset in Language.php Do not use isset() to check for null; furthermore this variable can no longer be null at this point now, so the check is useless. Also remove the initial defintion of $minDiff since this was the only case where it could be not set afterwards and fix spacing after the comment. Change-Id: I6e62ce1217e6e8750acb411673903fc3bde57841 --- languages/Language.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/languages/Language.php b/languages/Language.php index 964cd9f384..38d3af5c85 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1908,12 +1908,9 @@ class Language { $data[0] = 'Offset'; } - $minDiff = 0; if ( $data[0] == 'System' || $tz == '' ) { - #  Global offset in minutes. - if ( isset( $wgLocalTZoffset ) ) { - $minDiff = $wgLocalTZoffset; - } + # Global offset in minutes. + $minDiff = $wgLocalTZoffset; } elseif ( $data[0] == 'Offset' ) { $minDiff = intval( $data[1] ); } else { -- 2.20.1