fix typo on image type verification

This commit is contained in:
Thomas Rubini 2023-01-26 20:21:05 +01:00
parent 3fd908580e
commit 84ebcd13a4
No known key found for this signature in database
GPG Key ID: C7D287C8C1CAC373

View File

@ -133,7 +133,7 @@ final class UserController
if (isset($_FILES["profilPicture"]) && !empty($_FILES["profilPicture"]["name"])) {
if ($_FILES['profilPicture']['error'] === UPLOAD_ERR_OK) {
$info = getimagesize($_FILES['profilPicture']['tmp_name']);
if ($info !== false && ($info[2] === IMAGETYPE_JPEG || $info[2] !== IMAGETYPE_PNG)) {
if ($info !== false && ($info[2] === IMAGETYPE_JPEG || $info[2] === IMAGETYPE_PNG)) {
$fp = fopen($_FILES['profilPicture']['tmp_name'], 'rb');
$O_user->updateProfilePic($fp);
} else {