Merge pull request #10821 from MrPetovan/bug/notices

Relax check on id parameter in /photo
This commit is contained in:
Michael Vogel 2021-10-04 08:18:52 +02:00 committed by GitHub
commit c714595b70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -850,6 +850,10 @@ class User
*/ */
public static function getAvatarUrl(array $user, string $size = ''):string 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/'; $url = DI::baseUrl() . '/photo/';
switch ($size) { switch ($size) {

View File

@ -98,7 +98,7 @@ class Photo extends BaseModule
} }
// Please refactor this for the love of everything that's good // Please refactor this for the love of everything that's good
if (!empty($parameters['id'])) { if (isset($parameters['id'])) {
$uid = $parameters['id']; $uid = $parameters['id'];
} }