Skip to content

Commit 61bcafa

Browse files
authored
fix(config): recognize disabled zlib compression values (#10193)
1 parent a7495c5 commit 61bcafa

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

app/Config/Events.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525

2626
Events::on('pre_system', static function (): void {
2727
if (ENVIRONMENT !== 'testing') {
28-
if (ini_get('zlib.output_compression')) {
28+
$value = ini_get('zlib.output_compression');
29+
30+
if (filter_var($value, FILTER_VALIDATE_BOOLEAN) || (int) $value > 0) {
2931
throw FrameworkException::forEnabledZlibOutputCompression();
3032
}
3133

user_guide_src/source/changelogs/v4.7.3.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Bugs Fixed
4545
- **Database:** Fixed a bug where ``BaseConnection::listTables()`` could return a sparse array when using cached table names after a table was dropped.
4646
- **Database:** Fixed a bug where the PostgreSQL driver's ``increment()`` and ``decrement()`` methods were not working for numeric columns.
4747
- **Database:** Fixed a bug where the SQLSRV driver's decrement method was adding instead of subtracting the decrement value when ``$castTextToInt`` was false.
48+
- **Config:** Fixed a bug where the app starter's ``zlib.output_compression`` guard rejected the valid disabled value ``Off``.
4849
- **Entity:** Fixed a bug where ``Entity::normalizeValue()`` did not handle ``UnitEnum`` before checking for ``toArray()``, causing enums implementing ``toArray()`` to be incorrectly normalized as generic objects instead of enums.
4950
- **Kint:** Fixed a bug where stale Content Security Policy nonces were reused in worker mode, causing browser CSP violations for Debug Toolbar assets.
5051
- **Language:** Fixed a bug where ``Language::getLine()`` returned the literal dot-notation key instead of the nested array value when the requested key resolved to an intermediate array three or more levels deep.

0 commit comments

Comments
 (0)