From f25d5af0e179e94e7d8dd6fc9f21eca31e98f9ec Mon Sep 17 00:00:00 2001 From: memleakd <121398829+memleakd@users.noreply.github.com> Date: Tue, 12 May 2026 22:12:29 +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 | 2 +- user_guide_src/source/changelogs/v4.7.3.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Config/Events.php b/app/Config/Events.php index 946285b89519..f360d558db45 100644 --- a/app/Config/Events.php +++ b/app/Config/Events.php @@ -25,7 +25,7 @@ Events::on('pre_system', static function (): void { if (ENVIRONMENT !== 'testing') { - if (ini_get('zlib.output_compression')) { + if (! in_array(strtolower((string) ini_get('zlib.output_compression')), ['', '0', 'off'], true)) { 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.