Some changes after code review

This commit is contained in:
Michael 2022-08-31 19:03:37 +00:00
parent 9ca470cc94
commit cc43b567cb
3 changed files with 6 additions and 6 deletions

View file

@ -1095,7 +1095,7 @@ class Photo
$r = self::store($image, $user['uid'], 0, $resource_id, $filename, $album, 0, self::DEFAULT, $allow_cid, $allow_gid, $deny_cid, $deny_gid, $desc);
if (!$r) {
Logger::warning('Photo could not be stored');
Logger::warning('Photo could not be stored', ['uid' => $user['uid'], 'resource_id' => $resource_id, 'filename' => $filename, 'album' => $album]);
return [];
}
@ -1182,7 +1182,7 @@ class Photo
$r = self::store($image, $uid, 0, $resource_id, $filename, $album, 4, self::USER_AVATAR);
if (!$r) {
logger::warning('profile image upload with scale 4 (300) failed');
logger::warning('profile image upload with scale 4 (300) failed', ['uid' => $uid, 'resource_id' => $resource_id, 'filename' => $filename, 'album' => $album]);
}
if ($width > 80 || $height > 80) {
@ -1191,7 +1191,7 @@ class Photo
$r = self::store($image, $uid, 0, $resource_id, $filename, $album, 5, self::USER_AVATAR);
if (!$r) {
logger::warning('profile image upload with scale 5 (80) failed');
logger::warning('profile image upload with scale 5 (80) failed', ['uid' => $uid, 'resource_id' => $resource_id, 'filename' => $filename, 'album' => $album]);
}
if ($width > 48 || $height > 48) {
@ -1200,7 +1200,7 @@ class Photo
$r = self::store($image, $uid, 0, $resource_id, $filename, $album, 6, self::USER_AVATAR);
if (!$r) {
logger::warning('profile image upload with scale 6 (48) failed');
logger::warning('profile image upload with scale 6 (48) failed', ['uid' => $uid, 'resource_id' => $resource_id, 'filename' => $filename, 'album' => $album]);
}
logger::info('new profile image upload ended');