Merge pull request #10821 from MrPetovan/bug/notices
Relax check on id parameter in /photo
This commit is contained in:
commit
c714595b70
|
@ -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) {
|
||||||
|
|
|
@ -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'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue