-
-
Notifications
You must be signed in to change notification settings - Fork 483
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WP/PostsPerPage: bug fix - non-numeric values for "posts_per_page" sh…
…ould be disregarded This expands the tests for the "value capturing" fix in the previous commit. Additionally, it adds a safeguard to the `WordPress.WP.PostsPerPage` sniff `callback()` method to prevent reporting an error when the value captured is not purely numeric. This safeguard is needed as the way [text to number comparisons](https://wiki.php.net/rfc/string_to_number_comparison) are executed has changed in PHP 8.0 and that change affects this sniff. See: https://3v4l.org/nOlYL#veol Fixes 2027
- Loading branch information
Showing
3 changed files
with
48 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters