Skip to content

Balance stream error ops on file_put_contents LOCK_EX URL reject - #23186

Merged
iliaal merged 1 commit into
php:masterfrom
iliaal:fix/file-put-contents-lock-ex-depth
Aug 9, 2026
Merged

Balance stream error ops on file_put_contents LOCK_EX URL reject#23186
iliaal merged 1 commit into
php:masterfrom
iliaal:fix/file-put-contents-lock-ex-depth

Conversation

@iliaal

@iliaal iliaal commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

file_put_contents begins a stream error operation then returns early when LOCK_EX is used with a non-file URL without ending the operation. After ~1000 failures the depth limit is exhausted and later stream ops fail. End the operation before that RETURN_FALSE.

file_put_contents begins a stream error operation then returns early
when LOCK_EX is used with a non-file URL, without ending the operation.
After ~1000 such failures the depth limit is exhausted and later stream
ops fail. Call php_stream_error_operation_end before that RETURN_FALSE.

Closes phpGH-23186
@iliaal
iliaal merged commit 0b7f50a into php:master Aug 9, 2026
18 checks passed
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.

2 participants