Skip to content

Stdlib: coerce null path args in filestat builtins (#17006) - #17152

Merged
PurHur merged 1 commit into
masterfrom
fix/17006-filestat-null-coerce
Jul 7, 2026
Merged

PurHur merged 1 commit into
masterfrom
fix/17006-filestat-null-coerce

Conversation

@PurHur

@PurHur PurHur commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Closes #17006

Summary

  • Align filestat/path builtins with php-src Z_PARAM_PATH null → '' coercion (no TypeError) in both VM and JIT/AOT lowering.
  • Update compliance cases that previously asserted strict_types TypeError for these builtins.

Verification

  • source script/php-env.sh && php bin/vm.php test/repro/maintainer_gap_file_stat_null_coerce.php
  • source script/php-env.sh && php bin/compile.php -l test/repro/maintainer_gap_file_stat_null_coerce.php (took ~2m10s on this host)
  • source script/php-env.sh && php bin/jit.php test/repro/maintainer_gap_file_stat_null_coerce.php
  • source script/php-env.sh && php -d memory_limit=1536M vendor/bin/phpunit --filter \"file_stat_null_coerce|path_null_strict_filestat|filestat_is_null_strict_typeerror\"

Made with Cursor

Match php-src Z_PARAM_PATH null-to-empty-string behavior for file/path builtins across VM and JIT/AOT, and update strict_types compliance cases accordingly.

Co-authored-by: Cursor <cursoragent@cursor.com>
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: file_exists(null)/path builtins null filename — TypeError not false (re-#13354, ext/standard/filestat.c)

1 participant