mirror of
https://github.com/flarum/core.git
synced 2025-07-24 02:01:19 +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,
|
||||
]);
|
||||
|
||||
if ($mount->has($file = "target://$user->avatar_path")) {
|
||||
if ($user->avatar_path && $mount->has($file = "target://$user->avatar_path")) {
|
||||
$mount->delete($file);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user