Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

streams: Indicate which argument fails the stream ZPP check #18078

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Mar 15, 2025

No description provided.

Girgias added 2 commits March 15, 2025 21:00

Verified

This commit was signed with the committer’s verified signature.
Girgias Gina Peter Banyard

Verified

This commit was signed with the committer’s verified signature.
Girgias Gina Peter Banyard
@Girgias Girgias force-pushed the stream-zpp-follow-up branch from a22959f to ec13ba7 Compare March 15, 2025 21:00
@Girgias Girgias marked this pull request as ready for review March 15, 2025 21:52
*destination_stream_ptr = (php_stream*)res->ptr;
return true;
} else {
zend_argument_type_error(arg_num, "must be an open stream resource");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

open vs valid? The existing code uses valid instead of open, and this should be consistent imo.
Other parts of the PR look fine I think.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem I find is that a closed stream still feels "valid" but will fail such a check. This is why I changed it to "open"

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.

None yet

2 participants