diff --git a/framework/core/src/Core/Users/Commands/DeleteAvatarHandler.php b/framework/core/src/Core/Users/Commands/DeleteAvatarHandler.php index a06429572..0ab9f888b 100644 --- a/framework/core/src/Core/Users/Commands/DeleteAvatarHandler.php +++ b/framework/core/src/Core/Users/Commands/DeleteAvatarHandler.php @@ -51,7 +51,9 @@ class DeleteAvatarHandler event(new AvatarWillBeDeleted($user, $actor)); - $this->uploadDir->delete($avatarPath); + if ($this->uploadDir->has($avatarPath)) { + $this->uploadDir->delete($avatarPath); + } $user->save(); $this->dispatchEventsFor($user);