From be6040dd18fab38717e44f4066b5fa95a0afa7e7 Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 3 Jan 2022 04:35:54 +0200 Subject: [PATCH] fix empty avatar value --- src/application/controller/settings/profile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/application/controller/settings/profile.php b/src/application/controller/settings/profile.php index 007d2e0..85eefbb 100644 --- a/src/application/controller/settings/profile.php +++ b/src/application/controller/settings/profile.php @@ -52,7 +52,7 @@ if (isset($_POST) && !empty($_POST)) { $blockId = $_modelBlock->getThisBlock(); // Avatar provided - if (isset($_FILES['avatar']['tmp_name']) && getimagesize($_FILES['avatar']['tmp_name'])) { + if (isset($_FILES['avatar']['tmp_name']) && file_exists($_FILES['avatar']['tmp_name']) && getimagesize($_FILES['avatar']['tmp_name'])) { // Prepare image $image = new Imagick();