From 9e2e94da92750601a64e160fb5a1d8716064a104 Mon Sep 17 00:00:00 2001 From: Rob Lanphier Date: Sun, 15 May 2011 13:56:12 +0000 Subject: [PATCH] Changing !isset to is_null (thanks Roan!) and fixing some coding style stuff Followup to r88178 --- includes/Setup.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/includes/Setup.php b/includes/Setup.php index 6bc49ea2a8..01401ba574 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -345,12 +345,14 @@ wfMemoryLimit(); * that happens whenever you use a date function without the timezone being * explicitly set. Inspired by phpMyAdmin's treatment of the problem. */ -wfSuppressWarnings(); -if(!isset($wgLocaltimezone)) $wgLocaltimezone = date_default_timezone_get(); -wfRestoreWarnings(); +if ( is_null( $wgLocaltimezone) ) { + wfSuppressWarnings(); + $wgLocaltimezone = date_default_timezone_get(); + wfRestoreWarnings(); +} date_default_timezone_set( $wgLocaltimezone ); -if(!isset($wgLocalTZoffset)) { +if( is_null( $wgLocalTZoffset ) ) { $wgLocalTZoffset = date('Z') / 60; } -- 2.20.1