Skip to content

fix(stdlib): restore VmFilestatArg InternalStrictArg import (#17155) - #17156

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-17155-vmfilestatarg-import
Jul 7, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-17155-vmfilestatarg-import

Conversation

@PurHur

@PurHur PurHur commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Restore use PHPCompiler\VM\InternalStrictArg; in VmFilestatArg.php after Stdlib: coerce null path args in filestat builtins (#17006) #17152 accidentally removed it while leaving isCallerStrict() calls in parseFileModeArgForFrame() / requireIntOrStringArgForFrame().
  • Fixes fatal Class "PHPCompiler\ext\standard\InternalStrictArg" not found on chmod($f, '0644') and restores Zend string-mode coercion ('0644' → mode 204).

Root cause commit: 710cebce3 (#17152).

Verification

./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/maintainer_gap_chmod_octal_string.php'
# ok

./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/maintainer_gap_chmod_string_mode.php'
# int_mode=644 str_mode=204

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter "chmod_string_octal_mode|chmod_mode_string_weak|chmod_string_mode_typeerror"'
# OK (6 tests, 6 assertions)

Closes #17155

Made with Cursor

Commit 710cebc dropped the use statement while parseFileModeArgForFrame()
still calls InternalStrictArg::isCallerStrict(), breaking chmod()/mkdir()
string mode coercion with a fatal class-not-found error.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 2ee6a01 into master Jul 7, 2026
@PurHur
PurHur deleted the agent/issue-17155-vmfilestatarg-import branch July 7, 2026 10:32
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: chmod()/mkdir() string mode fatal — VmFilestatArg missing InternalStrictArg import (re-#15902, #17152)

1 participant