Skip to content

ext/gd: Fix comparison with result of php_stream_can_cast() #19107

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Jul 12, 2025

php_stream_can_cast() returns a zend_result and not a bool.

Found while working on #19106

@Girgias Girgias marked this pull request as ready for review July 12, 2025 18:43
@Girgias Girgias requested a review from devnexen as a code owner July 12, 2025 18:43
@Girgias
Copy link
Member Author

Girgias commented Jul 12, 2025

This should be backported but my base branch is master, but this should be a clean cherry-pick into 8.3

@devnexen
Copy link
Member

yes definitely.

@staabm
Copy link
Contributor

staabm commented Jul 13, 2025

Sounds like this path is missing a test

@Girgias
Copy link
Member Author

Girgias commented Jul 13, 2025

Sounds like this path is missing a test

Yes, but I don't really know the GD extension. This is probably testable by registering a userland wrapper that doesn't implement a cast method and using this as a stream.

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.

3 participants