Skip to content

Commit 15f6b48

Browse files
authored
refactor: finfo_close automatically freed in PHP 8.5
1 parent 5d8baed commit 15f6b48

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

system/Files/File.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,10 @@ public function getMimeType(): string
135135

136136
$finfo = finfo_open(FILEINFO_MIME_TYPE);
137137
$mimeType = finfo_file($finfo, $this->getRealPath() ?: $this->__toString());
138-
finfo_close($finfo);
138+
139+
if(PHP_VERSION_ID < 80500){
140+
finfo_close($finfo);
141+
}
139142

140143
return $mimeType;
141144
}

0 commit comments

Comments
 (0)