Skip to content

Fix ?? assign before header() suppressing CGI/AOT output (#9225) - #9719

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-9225-coalesce-header-output
Jun 18, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-9225-coalesce-header-output

Conversation

@PurHur

@PurHur PurHur commented Jun 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix compiler regression where $_SERVER['PATH_INFO'] ?? '' assigned to a variable before header() caused all subsequent output to be suppressed (VM + AOT).
  • Root cause: findCoalesceStmtForCallArg() walked backward from unrelated literal header() args and re-lowered an already-compiled stmt-level ??; lowerEmbeddedCoalesceCallArgs() only checked slotForOperand(coalesce->result) and missed ??= overrides.
  • Adds compliance guard coalesce_server_header_echo.phpt; unblocks 009-FastCGIWeb examples AOT smoke.

php-src reference

N/A (compile lowering bug). Pattern from examples/009-FastCGIWeb/example.php.

Verification

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
vendor/bin/phpunit --filter coalesce_server_header_echo
EXAMPLES_AOT_SMOKE_ONLY=009 ./script/examples-aot-smoke.sh
'

Output:

OK (2 tests, 2 assertions)
examples-aot-smoke: 009-FastCGIWeb: ok

Closes #9225

Made with Cursor

findCoalesceStmtForCallArg must not walk back to unrelated stmt-level
coalesce when lowering literal call args; detect existing ?? lowering via
slotForCoalesceResult so 009-FastCGIWeb AOT health echo works again.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 10451b5 into master Jun 18, 2026
@PurHur
PurHur deleted the agent/issue-9225-coalesce-header-output branch June 18, 2026 21:56
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.

Release v1.1.0: examples 000–009 AOT smoke green

1 participant