Skip to content

Commit

Permalink
Merge pull request #19992 from rob006/mimeTypes-revert
Browse files Browse the repository at this point in the history
Revert changes in `mimeTypes.php` from 4a1f2c6
  • Loading branch information
bizley authored Oct 6, 2023
2 parents 290e03c + 9f51fe3 commit 53f1619
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions framework/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ Yii Framework 2 Change Log
2.0.50 under development
------------------------

- no changes in this release.
- Bug #19925: Improved PHP version check when handling MIME types (schmunk42)


2.0.49.1 October 05, 2023
-------------------------

- Bug #19925: Improved PHP version check when handling MIME types (schmunk42)
- Bug #19940: File Log writer without newline (terabytesoftw)
- Bug #19950: Fix `Query::groupBy(null)` causes error for PHP 8.1: `trim(): Passing null to parameter #1 ($string) of type string is deprecated` (uaoleg)
- Bug #19951: Removed unneeded MIME file tests (schmunk42)
Expand Down
3 changes: 2 additions & 1 deletion framework/helpers/mimeTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,8 @@
'zmm' => 'application/vnd.handheld-entertainment+xml',
];

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 53f1619

Please sign in to comment.