Fix user preference access when not authenticated

refs #4609
This commit is contained in:
Johannes Meyer 2013-08-29 08:37:58 +02:00 committed by Marius Hein
parent bf5849a769
commit 28bd27d904
1 changed files with 1 additions and 1 deletions

View File

@ -410,7 +410,7 @@ class Web extends ApplicationBootstrap
*/
protected function setupTimezone()
{
$userTimeZone = $this->user->getPreferences()->get('app.timezone');
$userTimeZone = $this->user === null ? null : $this->user->getPreferences()->get('app.timezone');
try {
$tz = new DateTimeZone($userTimeZone);