From 91d001f29dafcf99c1fec795eeeec971a3258e7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20M=C3=A9ndez?= <45081533+FerMdez@users.noreply.github.com> Date: Tue, 1 Jun 2021 12:26:18 +0200 Subject: [PATCH] Corregido el error de subida de ficheros en el VMS Se ha eliminado la linea "finfo_close();" en todos los formularios. Esta llamada era la que generaba el problema, no es necesaria, pues la clase finfo hace el trabajo en su destructor. --- panel_admin/includes/formAddFilm.php | 2 +- panel_admin/includes/formAddPromotion.php | 2 +- panel_admin/includes/formEditFilm.php | 2 +- panel_admin/includes/formEditPromotion.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/panel_admin/includes/formAddFilm.php b/panel_admin/includes/formAddFilm.php index 2ddd471..156d43c 100644 --- a/panel_admin/includes/formAddFilm.php +++ b/panel_admin/includes/formAddFilm.php @@ -100,7 +100,7 @@ class formAddFilm extends Form{ $finfo = new \finfo(FILEINFO_MIME_TYPE); $mimeType = $finfo->file($_FILES['archivo']['tmp_name']); $ok = preg_match('/image\/*./', $mimeType); - finfo_close($finfo); + //finfo_close($finfo); if ( $ok ) { $tmp_name = $_FILES['archivo']['tmp_name']; diff --git a/panel_admin/includes/formAddPromotion.php b/panel_admin/includes/formAddPromotion.php index f566cc4..4bcdad4 100644 --- a/panel_admin/includes/formAddPromotion.php +++ b/panel_admin/includes/formAddPromotion.php @@ -100,7 +100,7 @@ class formAddPromotion extends Form{ $finfo = new \finfo(FILEINFO_MIME_TYPE); $mimeType = $finfo->file($_FILES['archivo']['tmp_name']); $ok = preg_match('/image\/*./', $mimeType); - finfo_close($finfo); + //finfo_close($finfo); if ( $ok ) { $tmp_name = $_FILES['archivo']['tmp_name']; diff --git a/panel_admin/includes/formEditFilm.php b/panel_admin/includes/formEditFilm.php index 3b17aaa..ea97dcb 100644 --- a/panel_admin/includes/formEditFilm.php +++ b/panel_admin/includes/formEditFilm.php @@ -111,7 +111,7 @@ class formEditFilm extends Form{ $finfo = new \finfo(FILEINFO_MIME_TYPE); $mimeType = $finfo->file($_FILES['archivo']['tmp_name']); $ok = preg_match('/image\/*./', $mimeType); - finfo_close($finfo); + //finfo_close($finfo); if ( $ok ) { $tmp_name = $_FILES['archivo']['tmp_name']; diff --git a/panel_admin/includes/formEditPromotion.php b/panel_admin/includes/formEditPromotion.php index a030a79..f57390f 100644 --- a/panel_admin/includes/formEditPromotion.php +++ b/panel_admin/includes/formEditPromotion.php @@ -106,7 +106,7 @@ class formEditPromotion extends Form{ $finfo = new \finfo(FILEINFO_MIME_TYPE); $mimeType = $finfo->file($_FILES['archivo']['tmp_name']); $ok = preg_match('/image\/*./', $mimeType); - finfo_close($finfo); + //finfo_close($finfo); if ( $ok ) { $tmp_name = $_FILES['archivo']['tmp_name'];