Skip to content

Commit

Permalink
Fix mime type generator
Browse files Browse the repository at this point in the history
  • Loading branch information
bizley committed Oct 8, 2023
1 parent bd296eb commit 4addf02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build/controllers/MimeTypeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ private function generateMimeTypesFile($outFile, $content)
*/
\$mimeTypes = $array;
if (PHP_VERSION_ID >= 80100) {
# fix for bundled libmagic bug, see also https://github.com/yiisoft/yii2/issues/19925
if ((PHP_VERSION_ID >= 80100 && PHP_VERSION_ID < 80122) || (PHP_VERSION_ID >= 80200 && PHP_VERSION_ID < 80209)) {
\$mimeTypes = array_replace(\$mimeTypes, array('xz' => 'application/octet-stream'));
}
Expand Down

0 comments on commit 4addf02

Please sign in to comment.