Skip to content

Commit 8c887b6

Browse files
authored
Merge pull request #634 from Automattic/follow-up/618-minor-docs-updates
Ruleset tests: minor updates
2 parents 71b5268 + b565f02 commit 8c887b6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

WordPress-VIP-Go/ruleset-test.inc

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ touch( $file ); // Warning + Message.
4747
unlink( $file ); // Warning + Message.
4848

4949
// WordPressVIPMinimum.Functions.RestrictedFunctions.cookies_setcookie
50-
setcookie( 'cookie[three]', 'cookiethree' ); // Error + Message.
50+
setcookie( 'cookie[three]', 'cookiethree' ); // Error.
5151

5252
// WordPressVIPMinimum.Variables.RestrictedVariables.cache_constraints___COOKIE
53-
$x = sanitize_key( $_COOKIE['bar'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated -- Error + Message.
53+
$x = sanitize_key( $_COOKIE['bar'] ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotValidated -- Error.
5454

5555
// WordPressVIPMinimum.Variables.RestrictedVariables.cache_constraints___SERVER__HTTP_USER_AGENT__
56-
if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && $_SERVER['HTTP_USER_AGENT'] === 'some_value' ) { // Error + Message.
56+
if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && $_SERVER['HTTP_USER_AGENT'] === 'some_value' ) { // Error.
5757
}
5858

5959
// WordPress.WP.AlternativeFunctions.file_system_read_fclose

WordPressVIPMinimum/ruleset-test.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ is_multi_author(); // Warning.
399399
the_sub_field( 'field' ); // Warning.
400400
the_field( 'field' ); // Warning.
401401
wp_remote_get( $url ); // Warning.
402-
setcookie( 'cookie[three]', 'cookiethree' ); // Warning.
402+
setcookie( 'cookie[three]', 'cookiethree' ); // Error.
403403
get_posts(); // Warning.
404404
wp_get_recent_posts(); // Warning.
405405
$wp_random_testing = create_function( '$a, $b', 'return ( $b / $a ); '); // Warning.

0 commit comments

Comments
 (0)