Fixed error when starting fresh / without existing database file (references #976)

This commit is contained in:
Bernd Bestel 2020-09-07 08:32:04 +02:00
parent 5b05254816
commit 38bb205a55
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300

View File

@ -18,7 +18,7 @@ class LocaleMiddleware extends BaseMiddleware
protected function getLocale(Request $request)
{
if (GROCY_AUTHENTICATED)
if (defined('GROCY_AUTHENTICATED') && GROCY_AUTHENTICATED)
{
$locale = UsersService::getInstance()->GetUserSetting(GROCY_USER_ID, 'locale');