Skip to content

Commit

Permalink
Merge branch 'develop' into silence_fclose
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccahum authored Apr 6, 2021
2 parents fe0237e + 66bf0a9 commit 2f838ff
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 15 deletions.
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
5 changes: 4 additions & 1 deletion WordPress-VIP-Go/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,10 @@
<rule ref="Generic.PHP.DisallowShortOpenTag.EchoFound">
<severity>0</severity>
</rule>
<rule ref="WordPress.WP.AlternativeFunctions.file_system_read_fclose">
<rule ref="WordPress.WP.AlternativeFunctions.file_system_read_readfile">
<severity>0</severity>
</rule>
<rule ref="WordPress.WP.AlternativeFunctions.file_system_read_fclose">
<severity>0</severity>
</rule>

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

0 comments on commit 2f838ff

Please sign in to comment.