From 9c78938ca9712e56bf6377015b3f1751b66f9626 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 4 Nov 2017 21:27:32 +0000 Subject: [PATCH] Improved "if" construct --- mod/settings.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mod/settings.php b/mod/settings.php index 679b5e31e7..d128ad5a75 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -521,10 +521,8 @@ function settings_post(App $a) { return; } - if ($timezone != $a->user['timezone']) { - if (strlen($timezone)) { - date_default_timezone_set($timezone); - } + if (($timezone != $a->user['timezone']) && strlen($timezone)) { + date_default_timezone_set($timezone); } $str_group_allow = perms2str($_POST['group_allow']); -- 2.39.5