From 77b7a88651f8c31edbe800eb894ee3f77368797a Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Sun, 13 Oct 2013 13:22:44 +0100 Subject: [PATCH] Use FILEINFO_MIME instead to get mime type FILEINFO_MIME_TYPE is only available on PHP 5.3+ and on some servers it'll use finfo_open but then get nothing back using this newer param option. --- lib/file-control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/file-control.php b/lib/file-control.php index 36acccd..9e331c2 100644 --- a/lib/file-control.php +++ b/lib/file-control.php @@ -27,7 +27,7 @@ if ($_GET['action']=="load") { $finfo = ""; // Determine what to do based on mime type if (function_exists('finfo_open')) { - $finfoMIME = finfo_open(FILEINFO_MIME_TYPE); + $finfoMIME = finfo_open(FILEINFO_MIME); $finfo = finfo_file($finfoMIME, $file); finfo_close($finfoMIME); } else {