Avoid CSS issue when upgrading to v1.2.29 without flushing user sessions

Fixes #5265
This commit is contained in:
Frédéric Guillot 2023-05-24 19:39:29 -07:00 committed by Frédéric Guillot
parent dfd3b4899b
commit 4121940ff1
1 changed files with 8 additions and 2 deletions

View File

@ -207,7 +207,13 @@ class UserSession extends Base
return 'light';
}
return session_get('user')['theme'];
$user_session = session_get('user');
if (array_key_exists('theme', $user_session)) {
return $user_session['theme'];
}
return 'light';
}
/**
@ -273,7 +279,7 @@ class UserSession extends Base
if (! session_exists('listOrder:'.$projectID)) {
return $default;
}
}
return session_get('listOrder:'.$projectID);
}