Skip to content

Commit cee6dd5

Browse files
committed
refactor: remove finfo_close has no effect since PHP 8.0
refactor: remove `finfo_close` has no effect since PHP 8.0
1 parent 1326621 commit cee6dd5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

system/Files/File.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,9 @@ public function getMimeType(): string
133133
return $this->originalMimeType ?? 'application/octet-stream'; // @codeCoverageIgnore
134134
}
135135

136-
$finfo = finfo_open(FILEINFO_MIME_TYPE);
137-
$mimeType = finfo_file($finfo, $this->getRealPath() ?: $this->__toString());
138-
finfo_close($finfo);
136+
$finfo = finfo_open(FILEINFO_MIME_TYPE);
139137

140-
return $mimeType;
138+
return finfo_file($finfo, $this->getRealPath() ?: $this->__toString());
141139
}
142140

143141
/**

0 commit comments

Comments
 (0)