From fa3a19382cef2ec7bfb6fe7e846286f341d7c42c Mon Sep 17 00:00:00 2001 From: grandeljay Date: Mon, 5 Dec 2022 10:43:28 +0100 Subject: [PATCH] Fix Typed property wishthis\User::$language must not be accessed before initialization --- src/classes/user.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/user.php b/src/classes/user.php index 9b16254f..ef812be3 100644 --- a/src/classes/user.php +++ b/src/classes/user.php @@ -95,7 +95,7 @@ class User public function getLocale(): string { - return $this->language; + return $this->language ?? DEFAULT_LOCALE; } /**