From 2683fc05d1f504b5d3d15e5373df19ec1f5e08cd Mon Sep 17 00:00:00 2001 From: memleakd <121398829+memleakd@users.noreply.github.com> Date: Fri, 15 May 2026 18:08:42 +0200 Subject: [PATCH] fix(config): recognize disabled zlib compression values - accept Off as a disabled zlib.output_compression value - keep the zlib output-buffer guard active for enabled values - update the 4.7.3 changelog Signed-off-by: memleakd <121398829+memleakd@users.noreply.github.com> --- app/Config/Events.php | 4 +++- user_guide_src/source/changelogs/v4.7.3.rst | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Config/Events.php b/app/Config/Events.php index 946285b89519..7dc950772c0e 100644 --- a/app/Config/Events.php +++ b/app/Config/Events.php @@ -25,7 +25,9 @@ Events::on('pre_system', static function (): void { if (ENVIRONMENT !== 'testing') { - if (ini_get('zlib.output_compression')) { + $value = ini_get('zlib.output_compression'); + + if (filter_var($value, FILTER_VALIDATE_BOOLEAN) || (int) $value > 0) { throw FrameworkException::forEnabledZlibOutputCompression(); } diff --git a/user_guide_src/source/changelogs/v4.7.3.rst b/user_guide_src/source/changelogs/v4.7.3.rst index b0eb65e687ab..6625c7ac7e5a 100644 --- a/user_guide_src/source/changelogs/v4.7.3.rst +++ b/user_guide_src/source/changelogs/v4.7.3.rst @@ -45,6 +45,7 @@ Bugs Fixed - **Database:** Fixed a bug where ``BaseConnection::listTables()`` could return a sparse array when using cached table names after a table was dropped. - **Database:** Fixed a bug where the PostgreSQL driver's ``increment()`` and ``decrement()`` methods were not working for numeric columns. - **Database:** Fixed a bug where the SQLSRV driver's decrement method was adding instead of subtracting the decrement value when ``$castTextToInt`` was false. +- **Config:** Fixed a bug where the app starter's ``zlib.output_compression`` guard rejected the valid disabled value ``Off``. - **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. - **Kint:** Fixed a bug where stale Content Security Policy nonces were reused in worker mode, causing browser CSP violations for Debug Toolbar assets. - **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.