-
Notifications
You must be signed in to change notification settings - Fork 808
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
Phan: Fix errant extra params in function calls #41263
Conversation
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
That function doesn't allow a status code to be passed. Presumably we could override the WP_REST_Response status and force 200, but passing it through has worked so far, so keeping it that way.
In most cases, these appear to be due to refactors.
We're using `WP_Option`, which allows an extra param in its `get()`.
9e85fc4
to
a584a6a
Compare
Code Coverage SummaryThis PR did not change code coverage! That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷 |
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.
LGTM
This cleans up
PhanParamTooMany
errors.Proposed changes:
After cleaning up the single instance of
PhanParamTooFewInternal
in #41247, I decided to have a look at the inverse issue,PhanParamTooMany
.Issues fixed include:
remove_filter
/remove_action
rest_ensure_response
get_avatar_url
callsarrayHasKey
instead ofassertArrayHasKey
sprintf
This PR addresses all but the following three instances of the error:
projects/plugins/crm/api/companies.php:70
: separate PR forthcomingprojects/plugins/jetpack/extensions/blocks/cookie-consent/cookie-consent.php:48
: handled in Fix cookie consent registration call #41257projects/plugins/boost/wp-js-data-sync.php
: the fix for this looks simple (remove the param), but it seems like it should be doing something more and I'd like some more eyes on itOther information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
Is the CI content?