Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 0c8e6c6

Browse files
author
Jamie Snape
committed
Fix MIME type component for Cloud Storage
1 parent fe1776a commit 0c8e6c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/controllers/components/MimeTypeComponent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class MimeTypeComponent extends AppComponent
2929
*/
3030
public function getType($filename)
3131
{
32-
if (file_exists($filename)) {
32+
if (function_exists('finfo_open') && file_exists($filename)) {
3333
$fileInfo = finfo_open(FILEINFO_MIME_TYPE);
3434
$mimeType = finfo_file($fileInfo, $filename);
3535
finfo_close($fileInfo);

0 commit comments

Comments
 (0)