Merge "Fix and make some types in PHPDoc and JSDoc tags more specific"
[lhc/web/wiklou.git] / includes / libs / filebackend / FileBackendStore.php
index 9bfdbe8..77473d1 100644 (file)
@@ -1840,14 +1840,8 @@ abstract class FileBackendStore extends FileBackend {
                        return call_user_func_array( $this->mimeCallback, func_get_args() );
                }
 
-               $mime = null;
-               if ( $fsPath !== null && function_exists( 'finfo_file' ) ) {
-                       $finfo = finfo_open( FILEINFO_MIME_TYPE );
-                       $mime = finfo_file( $finfo, $fsPath );
-                       finfo_close( $finfo );
-               }
-
-               return is_string( $mime ) ? $mime : 'unknown/unknown';
+               $mime = ( $fsPath !== null ) ? mime_content_type( $fsPath ) : false;
+               return $mime ?: 'unknown/unknown';
        }
 }