Skip to content

ext/mysqli: Use zval_is_true() instead of converting to boolean #18682

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

Merged
merged 2 commits into from
May 31, 2025

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented May 28, 2025

No description provided.

Copy link
Member

@nielsdos nielsdos left a comment

Choose a reason for hiding this comment

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

This will leak memory if the property is refcounted.

@Girgias Girgias force-pushed the mysqli-convert-bool branch from a0689c2 to e753e0c Compare May 29, 2025 10:31
@Girgias Girgias requested a review from nielsdos May 29, 2025 10:31
@Girgias
Copy link
Member Author

Girgias commented May 29, 2025

This will leak memory if the property is refcounted.

Nicely spotted, added a test case. :)

@Girgias Girgias force-pushed the mysqli-convert-bool branch from bb5220a to 2cdee17 Compare May 31, 2025 13:25
@Girgias Girgias merged commit 9e67d0b into php:master May 31, 2025
8 of 9 checks passed
@Girgias Girgias deleted the mysqli-convert-bool branch May 31, 2025 13:25
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.

4 participants