-
-
Notifications
You must be signed in to change notification settings - Fork 503
Add rest_sanitize_boolean()
to unslashing sanitizing functions
#2530
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
Conversation
The test failure looks unrelated to the changes in this PR. @jrfnl We pull in PHPCSUtils |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://developer.wordpress.org/reference/functions/rest_sanitize_boolean/
Change makes sense to me.
Correct.
This is actually related to a change in PHP 8.4, which will be supported in PHPCS 4.x and which PHPCSUtils 1.1.0 will support for both PHPCS 3.x as well as 4.x: properties in interfaces are now allowed. |
FYI: I have a fix ready for this, but that fix needs PHPCSUtils 1.1.0 (for supporting PHPCS 3.x), so I'll pull it once that's been released (expected this week). |
Thanks @westonruter ! LGTM. Once PR #2532 has been merged, this can be rebased and merged. |
@westonruter When you have time, would you please rebase this PR (without changes), so we can have a passing build before merging ? |
ab84c0b
to
538196c
Compare
@jrfnl rebased! |
Thanks @westonruter ! Merging now. |
The
rest_sanitize_boolean()
function always returns abool
so it is essentially the same asboolval()
.