| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Update `CODEOWNERS`, removing inactive contributors and adding newer active contributors
There was a problem hiding this comment.
Thank you, @westonruter, for the PR. The changes appear satisfactory to me. Considering that we adopted the code from the plugin API, should we also update this code within the core itself?
Sorry, something went wrong.
|
@mukeshpanchal27 I don't think the problem exists in core. It's using sprintf(). For example: https://github.com/WordPress/wordpress-develop/blob/57597d9cccc68943fe706c8bb3148a2c71ac2105/src/wp-admin/includes/class-wp-plugins-list-table.php#L1291-L1296 |
Sorry, something went wrong.
@westonruter, removing wp_kses_post triggers an error in npm run lint-php stating: "All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '__'." Although this error isn't currently shown in core, it's possible it may appear in the future. Similarly, the int cast, such as seen in core here, could potentially trigger similar php standard errors in the future. |
Sorry, something went wrong.
There was a problem hiding this comment.
Great catch!
This is actually a crucial bug fix as it prevents messages with broken links, so it should be made against the release branch :)
Sorry, something went wrong.
|
After adjusting the base branch, the PR now also includes the CODEOWNERS changes from trunk, but that's perfectly fine as it doesn't affect the release anyway. I'll go ahead and merge. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
This fixes some things which were missed when reviewing #864. Primarily, arguments are being passed directly to wp_kses_post() when they should be passed first to sprintf(). I discovered this issue when switching to trunk and running PHPStan. In working on Image Loading Optimization, I have increased the level in the phpstan.neon from 0 to 6, and it detected these issues:
The last one regarding _nx() is minor since _nx() doesn't have strict typing for the $number parameter passed to _nx().
Note that my local PHPStan config also has to have quite a few errors (via baseline) it has to ignore in order to pass level 6:
phpstan-baseline.neonMany of these should be addressed as part of #775.
Relevant technical choices
Checklist