Ticket #1485222: fifno.patch

File fifno.patch, 482 bytes (added by arekm, 6 months ago)

fallback to finfo and default mimetype

  • ../program/include/rcube_shared.inc

    old new  
    561561    $mime_magic = $CONFIG['mime_magic']; 
    562562 
    563563    if (function_exists('mime_content_type')) { 
    564         return mime_content_type($path); 
     564        $finfo = mime_content_type($path); 
     565        if ($finfo) 
     566            return $finfo; 
    565567    } 
    566568    if (!extension_loaded('fileinfo')) {  
    567569        if (!dl('fileinfo.' . PHP_SHLIB_SUFFIX)) {