From 7ecf80d4e997bf1beb58dd4973004ebaa8fb30a2 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Sat, 5 Nov 2022 10:45:08 +0100 Subject: [PATCH] Check function_exists('mime_content_type') before calling mime_content_type() is in the fileinfo extension that may not be installed or configured. It's also checked in action.php See https://piwigo.org/forum/viewtopic.php?id=32327 --- admin/include/functions_metadata.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/include/functions_metadata.php b/admin/include/functions_metadata.php index 22cd279cc..2f63377ca 100644 --- a/admin/include/functions_metadata.php +++ b/admin/include/functions_metadata.php @@ -182,7 +182,7 @@ function get_sync_metadata($infos) $file = original_to_representative($file, $infos['representative_ext']); } - if (in_array(mime_content_type($file), array('image/svg+xml', 'image/svg'))) + if (function_exists('mime_content_type') && in_array(mime_content_type($file), array('image/svg+xml', 'image/svg'))) { $xml = file_get_contents($file);