mirror of
https://github.com/flarum/core.git
synced 2025-07-25 10:41:24 +02:00
Don't attempt deletion if the user doesn't have an avatar
This commit is contained in:
@@ -51,7 +51,7 @@ class UploadAvatarCommandHandler
|
|||||||
'target' => $this->uploadDir,
|
'target' => $this->uploadDir,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ($mount->has($file = "target://$user->avatar_path")) {
|
if ($user->avatar_path && $mount->has($file = "target://$user->avatar_path")) {
|
||||||
$mount->delete($file);
|
$mount->delete($file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user