Skip to content

phar: propagate phar_stream_flush return value from phar_stream_close (GH-21799)#42

Closed
iliaal wants to merge 1 commit intoPHP-8.4from
fix/phar-stream-flush-propagate
Closed

phar: propagate phar_stream_flush return value from phar_stream_close (GH-21799)#42
iliaal wants to merge 1 commit intoPHP-8.4from
fix/phar-stream-flush-propagate

Conversation

@iliaal
Copy link
Copy Markdown
Owner

@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 php#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
@iliaal
Copy link
Copy Markdown
Owner Author

iliaal commented Apr 18, 2026

Submitted upstream as php#21804.

@iliaal iliaal closed this Apr 18, 2026
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.

1 participant