mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
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
This commit is contained in:
committed by
Pierrick Le Gall
parent
c88ca1ed0f
commit
7ecf80d4e9
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user