We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
finfo_close
1 parent dfc34fd commit ae08d14Copy full SHA for ae08d14
system/Files/File.php
@@ -133,11 +133,9 @@ public function getMimeType(): string
133
return $this->originalMimeType ?? 'application/octet-stream'; // @codeCoverageIgnore
134
}
135
136
- $finfo = finfo_open(FILEINFO_MIME_TYPE);
137
- $mimeType = finfo_file($finfo, $this->getRealPath() ?: $this->__toString());
138
- finfo_close($finfo);
+ $finfo = finfo_open(FILEINFO_MIME_TYPE);
139
140
- return $mimeType;
+ return finfo_file($finfo, $this->getRealPath() ?: $this->__toString());
141
142
143
/**
0 commit comments