Skip to content
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

RestrictedFunctionsSniff: Remove wp_cache_get_multi group #644

Merged
merged 1 commit into from
Apr 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion WordPress-VIP-Go/ruleset-test.inc
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ $my_notokay_func = 'extract';
$my_notokay_func(); // Error.

// WordPressVIPMinimum.Functions.RestrictedFunctions
wp_cache_get_multi(); // Error.

opcache_reset(); // Error.
opcache_invalidate( 'test_script.php' ); // Error.
opcache_compile_file( $var ); // Error.
Expand Down
1 change: 0 additions & 1 deletion WordPress-VIP-Go/ruleset-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
341 => 1,
342 => 1,
346 => 1,
349 => 1,
350 => 1,
351 => 1,
352 => 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,6 @@ class RestrictedFunctionsSniff extends AbstractFunctionRestrictionsSniff {
public function getGroups() {

$groups = [
'wp_cache_get_multi' => [
'type' => 'error',
'message' => '`%s` is not supported on the WordPress.com VIP platform.',
'functions' => [
'wp_cache_get_multi',
],
],
'opcache' => [
'type' => 'error',
'message' => '`%s` is prohibited on the WordPress VIP platform due to memory corruption.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ $allowed_html = [
];
$url = 'http://www.google.ca';

wp_cache_get_mult(); // Ok - similarly-named function to wp_cache_get_multi().
wp_cache_get_multi(); // Error.



opcache_resets(); // Ok - similarly-named custom function to opcache_reset().
opcach_invalidate ( $test_script ); // Ok - similarly-named custom function to opcache_invalidate().
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class RestrictedFunctionsUnitTest extends AbstractSniffUnitTest {
*/
public function getErrorList() {
return [
19 => 1,
27 => 1,
28 => 1,
29 => 1,
Expand Down
2 changes: 1 addition & 1 deletion WordPressVIPMinimum/ruleset-test.inc
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ $my_notokay_func = 'extract';
$my_notokay_func(); // Error.

// WordPressVIPMinimum.Functions.RestrictedFunctions
wp_cache_get_multi(); // Error.

opcache_reset(); // Error.
opcache_invalidate( 'test_script.php' ); // Error.
opcache_compile_file( $var ); // Error.
Expand Down
1 change: 0 additions & 1 deletion WordPressVIPMinimum/ruleset-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
303 => 1,
304 => 1,
308 => 1,
311 => 1,
312 => 1,
313 => 1,
314 => 1,
Expand Down