Fix UserController::deleteImage()

This commit is contained in:
Giuseppe Criscione 2023-09-02 00:52:56 +02:00
parent 97c16314df
commit 924154ee8a

View File

@ -228,7 +228,7 @@ class UsersController extends AbstractController
protected function deleteImage(User $user): void
{
$image = $user->image()->path();
if ($image !== null && FileSystem::exists($image)) {
if (FileSystem::isFile($image, assertExists: false)) {
FileSystem::delete($image);
}
}