Skip to content

phar: propagate phar_stream_flush return value from phar_stream_close#21804

Open
iliaal wants to merge 1 commit intophp:PHP-8.4from
iliaal:fix/phar-stream-flush-propagate
Open

phar: propagate phar_stream_flush return value from phar_stream_close#21804
iliaal wants to merge 1 commit intophp:PHP-8.4from
iliaal:fix/phar-stream-flush-propagate

Conversation

@iliaal
Copy link
Copy Markdown
Contributor

@iliaal iliaal commented Apr 18, 2026

phar_stream_close called phar_stream_flush but discarded its int return value, always returning 0 from the stream close operation. On a write-modified phar entry, a flush failure (disk full during archive commit, etc.) was silently ignored.

Capture the flush result and return it so the stream layer receives an accurate close status.

Fixes #21799

phar_stream_close called phar_stream_flush but discarded its int return
value, always returning 0 from the stream close operation. On a write-
modified phar entry, a flush failure (e.g. disk full during archive
commit) was silently ignored.

Capture the flush result and return it so the stream layer gets an
accurate close status.

Closes phpGH-21799
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