diff --git a/src/Model/User.php b/src/Model/User.php index 8f69aa87c..3178b888e 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -850,6 +850,10 @@ class User */ public static function getAvatarUrl(array $user, string $size = ''):string { + if (empty($user['nickname'])) { + DI::logger()->warning('Missing user nickname key', ['trace' => System::callstack(20)]); + } + $url = DI::baseUrl() . '/photo/'; switch ($size) { diff --git a/src/Module/Photo.php b/src/Module/Photo.php index ea6af2636..e1a8eef87 100644 --- a/src/Module/Photo.php +++ b/src/Module/Photo.php @@ -98,7 +98,7 @@ class Photo extends BaseModule } // Please refactor this for the love of everything that's good - if (!empty($parameters['id'])) { + if (isset($parameters['id'])) { $uid = $parameters['id']; }