Skip to content

fix(http): correct header presence check for falsy values#2159

Merged
innocenzi merged 1 commit into
tempestphp:3.xfrom
xHeaven:fix/falsy-header-values
Jun 5, 2026
Merged

fix(http): correct header presence check for falsy values#2159
innocenzi merged 1 commit into
tempestphp:3.xfrom
xHeaven:fix/falsy-header-values

Conversation

@xHeaven
Copy link
Copy Markdown
Member

@xHeaven xHeaven commented Jun 5, 2026

has() shouldn't report false for existing headers that have falsy (eg. 0, '', null) value.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

Benchmark Results

Comparison of fix/falsy-header-values against 3.x (c699ab834d421d13f092554fe749e3599d3ad026).

Open to see the benchmark results
Benchmark Set Mem. Peak Time Variability
ViewRenderBench(benchPlainHtml) - 21.976mb 0.00% 444.515μs -6.59% ±3.40% +107.08%
ViewRenderBench(benchControlFlow) - 44.443mb 0.00% 714.002μs +6.82% ±2.60% +122.89%

Generated by phpbench against commit 70e3eb2

@innocenzi innocenzi merged commit 48b7813 into tempestphp:3.x Jun 5, 2026
76 of 77 checks passed
@xHeaven xHeaven deleted the fix/falsy-header-values branch June 5, 2026 23:40
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.

2 participants