Fix #81302: Stream position after stream filter removed#7354
Closed
cmb69 wants to merge 1 commit intophp:PHP-7.4from
Closed
Fix #81302: Stream position after stream filter removed#7354cmb69 wants to merge 1 commit intophp:PHP-7.4from
cmb69 wants to merge 1 commit intophp:PHP-7.4from
Conversation
When flushing the stream filters actually causes data to be written to the stream, we need to update its position, because that is not done by the streams' write methods.
Member
|
Something I'm a bit confused about is this code in write_buffer: php-src/main/streams/streams.c Lines 1148 to 1152 in 1c675b9 It only changes the position for seekable streams, though I don't really understand the rationale given in the comment. |
Member
|
Looks like the code originally looked like this: f98f27f Possibly the condition around the |
Member
Author
|
I think you're right; 088e269#diff-34c102f51eb0af2504e7d1c1f588a83c6555ae92d2f83602314ea45fc94621b4 looks fishy; not updating the position for non-seekable streams seems to be a bug. I'm going to check that. |
Member
Author
|
See PR #7356. |
nikic
approved these changes
Aug 10, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When flushing the stream filters actually causes data to be written to
the stream, we need to update its position, because that is not done by
the streams' write methods.