diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 8c3d204757..35e8ebde9b 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -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) diff --git a/framework/helpers/mimeTypes.php b/framework/helpers/mimeTypes.php index 707bdc7717..e91f80f95f 100644 --- a/framework/helpers/mimeTypes.php +++ b/framework/helpers/mimeTypes.php @@ -1003,7 +1003,8 @@ $mimeTypes = [ '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')); }