summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-03-15 16:26:18 +0100
committeremkael <emkael@tlen.pl>2017-03-15 16:47:25 +0100
commit917a2dde09925199f9000b35e74fecb67af326ec (patch)
treec644f1df1361c3925c37d9fc20b64fd1058f5412
parent1543d72d899e49f5a89d5fbac22a178d821598a4 (diff)
* don't crash when there's no timezone selected for user
-rw-r--r--app/frontend/facades/UserFacade.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/frontend/facades/UserFacade.php b/app/frontend/facades/UserFacade.php
index 0bc5863..6a7feac 100644
--- a/app/frontend/facades/UserFacade.php
+++ b/app/frontend/facades/UserFacade.php
@@ -68,7 +68,7 @@ class UserFacade extends Facade {
}
public function getTimezonePreference(DbUser $user) {
- if (!$user->IsGuest) {
+ if (!$user->IsGuest && $user->DbRecord->Timezone) {
try {
return new TimezoneDTO($user->DbRecord->Timezone);
} catch(Exception $e) {}