Skip to content

Stdlib: gzcompress/gzencode/gzdeflate null $level E_DEPRECATED (#31445) - #31467

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-31445-gz-null-level
Aug 16, 2026
Merged

Stdlib: gzcompress/gzencode/gzdeflate null $level E_DEPRECATED (#31445)#31467
PurHur merged 1 commit into
masterfrom
agent/issue-31445-gz-null-level

Conversation

@PurHur

@PurHur PurHur commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Summary

Test plan

  • ./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/maintainer_gap_gz_null_level.php'
  • ./script/docker-exec.sh -- bash -lc 'php bin/jit.php test/repro/maintainer_gap_gz_null_level.php'
  • strict TypeError repro (VM + JIT)
  • ./script/phpunit.sh --filter 'Issue31445GzNullLevelTest|GzNullLevelSoft' → OK (6 tests)

Verification transcript (VM soft-null)

ERR[8192]: gzcompress(): Passing null to parameter #2 ($level) of type int is deprecated
gzcompress OK
ERR[8192]: gzencode(): Passing null to parameter #2 ($level) of type int is deprecated
gzencode OK
ERR[8192]: gzdeflate(): Passing null to parameter #2 ($level) of type int is deprecated
gzdeflate OK

Closes #31445

Made with Cursor

Z_PARAM_LONG soft-null on $level now emits Zend-identical deprecation then
coerces to 0 (VM + JIT); strict_types still TypeErrors.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 7dfeb2b into master Aug 16, 2026
1 check failed
@PurHur
PurHur deleted the agent/issue-31445-gz-null-level branch August 16, 2026 17:21
@PurHur
PurHur restored the agent/issue-31445-gz-null-level branch August 16, 2026 17:22
@PurHur
PurHur deleted the agent/issue-31445-gz-null-level branch August 26, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: gzcompress/gzencode/gzdeflate(..., null) level silent — Zend E_DEPRECATED (ext/zlib/zlib.c)

1 participant