Skip to content

stream: check fopen() mode ahead of time#22803

Open
Girgias wants to merge 1 commit into
php:masterfrom
Girgias:2026-07-fopen-mode-check
Open

stream: check fopen() mode ahead of time#22803
Girgias wants to merge 1 commit into
php:masterfrom
Girgias:2026-07-fopen-mode-check

Conversation

@Girgias

@Girgias Girgias commented Jul 19, 2026

Copy link
Copy Markdown
Member

And change the signature of php_stream_parse_fopen_modes() to not require an out param as the failure can simply be communicated via -1 which is not a valid open flag mode.

And change the signature of php_stream_parse_fopen_modes() to not require an out param as the failure can simply be communicated via -1 which is not a valid open flag mode.
@Girgias

Girgias commented Jul 19, 2026

Copy link
Copy Markdown
Member Author

Hmmmm, not sure we can fully check ahead of time, as custom stream wrappers might support strange modes :-/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant