Skip to content

fix(config): recognize disabled zlib compression values#10193

Open
memleakd wants to merge 1 commit into
codeigniter4:developfrom
memleakd:fix/frankenphp-zlib-output-compression
Open

fix(config): recognize disabled zlib compression values#10193
memleakd wants to merge 1 commit into
codeigniter4:developfrom
memleakd:fix/frankenphp-zlib-output-compression

Conversation

@memleakd
Copy link
Copy Markdown
Contributor

@memleakd memleakd commented May 12, 2026

Description

Fixes #10192

This PR updates the app starter’s zlib.output_compression guard to recognize valid disabled ini values. The previous guard used a loose truthiness check:

if (ini_get('zlib.output_compression')) {
    throw FrameworkException::forEnabledZlibOutputCompression();
}

This can reject valid disabled values such as "Off" because PHP treats non-empty strings as truthy.

The guard now allows disabled values:

'', '0', 'off'

and still rejects enabled values. This keeps the output-buffer protection in place while avoiding false failures when PHP reports zlib.output_compression as "Off".

The 4.7.3 changelog is updated.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@memleakd memleakd closed this May 12, 2026
@memleakd memleakd force-pushed the fix/frankenphp-zlib-output-compression branch from 9cb872c to f5ad0cb Compare May 12, 2026 12:07
@memleakd memleakd reopened this May 12, 2026
@memleakd memleakd changed the title fix: skip zlib guard in worker mode fix: disable HotReloader zlib compression with falsey value May 12, 2026
Comment thread system/HotReloader/HotReloader.php Outdated
@github-actions github-actions Bot added the stale Pull requests with conflicts label May 12, 2026
@github-actions
Copy link
Copy Markdown

👋 Hi, @memleakd!

We detected conflicts in your PR against the base branch 🙊
You may want to sync 🔄 your branch with upstream!

Ref: Syncing Your Branch

@memleakd memleakd force-pushed the fix/frankenphp-zlib-output-compression branch from 89acc58 to f25d5af Compare May 12, 2026 20:11
- 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>
@memleakd memleakd changed the title fix: disable HotReloader zlib compression with falsey value fix(config): recognize disabled zlib compression values May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Pull requests with conflicts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: zlib.output_compression guard rejects valid disabled Off value

2 participants