Skip to content

Stdlib: in_array/array_search null $strict TypeError under strict_types (#29866) - #30074

Merged
PurHur merged 1 commit into
masterfrom
fix/29866-in-array-strict-null
Aug 11, 2026
Merged

Stdlib: in_array/array_search null $strict TypeError under strict_types (#29866)#30074
PurHur merged 1 commit into
masterfrom
fix/29866-in-array-strict-null

Conversation

@PurHur

@PurHur PurHur commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #29866

Test plan

  • PHP_COMPILER_PROFILE=8.4 php bin/vm.php test/repro/issue_29866_in_array_strict_null.php → TypeError both calls
  • php bin/jit.php same repro → TypeError
  • ./phpc build -o /tmp/ia29866 test/repro/issue_29866_in_array_strict_null.php && /tmp/ia29866 → TypeError
  • Weak path: null $strict without strict_types → DEP + coerce (true / 0)
  • ./script/phpunit.sh --filter InArrayArraySearchStrictNull → OK (3)
  • ./script/phpunit.sh --filter in_array_array_search_strict_null → OK (4, includes AotTest)

Pillar probe (pre-implement)

  • bootstrap-inventory --check: docs method-count drift only (not spine)
  • release-readiness --json: north-star5-fast ok; user_release_ready: no due to pre-existing helper-runtime prelink stale (Urlencode/Utf8Latin1) — untouched by this PR

Made with Cursor

…es (#29866)

Reuse Z_PARAM_BOOL guards (VmMath::parseBoolBuiltinArgForFrame /
JitBoolArg::lowerCoerceZParamBool) so null $strict matches php-src under
strict_types and soft-DEP+coerces without it.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit be72ae1 into master Aug 11, 2026
1 check failed
@PurHur
PurHur deleted the fix/29866-in-array-strict-null branch August 11, 2026 02:09
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: in_array/array_search(..., null) $strict under strict_types coerces — Zend TypeError (ext/standard/array.c)

1 participant