From b4fabb6d5995428c41a7e02178485ad8d2292adf Mon Sep 17 00:00:00 2001 From: Yasen Pramatarov Date: Mon, 7 Apr 2025 12:32:54 +0300 Subject: [PATCH] Fixes border case when timezone is empty but not null --- app/templates/profile.php | 2 +- public_html/index.php | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/templates/profile.php b/app/templates/profile.php index 86da6c4..774df1a 100644 --- a/app/templates/profile.php +++ b/app/templates/profile.php @@ -47,7 +47,7 @@
- +   ()
diff --git a/public_html/index.php b/public_html/index.php index 95bd1c3..e7003ab 100644 --- a/public_html/index.php +++ b/public_html/index.php @@ -11,7 +11,7 @@ * Version: 0.3 */ -// we start output buffering and. +// we start output buffering and // flush it later only when there is no redirect ob_start(); @@ -195,8 +195,7 @@ if ($page == 'logout') { $user_id = $userObject->getUserId($currentUser)[0]['id']; $userDetails = $userObject->getUserDetails($user_id); $userRights = $userObject->getUserRights($user_id); - $userTimezone = isset($userDetails[0]['timezone']) ? $userDetails[0]['timezone'] : 'UTC'; // Default to UTC if no timezone is set - + $userTimezone = (!empty($userDetails[0]['timezone'])) ? $userDetails[0]['timezone'] : 'UTC'; // Default to UTC if no timezone is set (or is missing) // check if the Jilo Server is running require '../app/classes/server.php';