[MEDIA][EXCEPTIONS] Fix errors and deprecations

This commit is contained in:
Hugo Sales
2020-08-09 12:44:47 +00:00
committed by Hugo Sales
parent 08e5b313ce
commit 4128a5403d
11 changed files with 26 additions and 12 deletions

View File

@@ -70,12 +70,12 @@ abstract class Common
DB::flush();
}
public static function user(): LocalUser
public static function user(): ?LocalUser
{
return Security::getUser();
}
public static function profile(): Profile
public static function profile(): ?Profile
{
return self::user()->getProfile();
}