Skip to content

Commit

Permalink
Merge pull request #692 from Automattic/remove/dbDelta
Browse files Browse the repository at this point in the history
Remove dbDelta Warning
  • Loading branch information
rebeccahum authored Jun 28, 2021
2 parents f6a4a16 + 75ece92 commit e1eb7c9
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 19 deletions.
4 changes: 2 additions & 2 deletions WordPress-VIP-Go/ruleset-test.inc
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ filter_var_array( $array, FILTER_SANITIZE_STRING ); // Ok.
filter_input_array( $array,FILTER_SANITIZE_STRING ); // Ok.
filter_input( INPUT_GET, 'foo', FILTER_DEFAULT ); // Warning.

// WordPressVIPMinimum.Functions.RestrictedFunctions.dbDelta_dbdelta
dbDelta( $query, true ); // Warning.



// WordPressVIPMinimum.Functions.RestrictedFunctions.wp_mail_wp_mail
wp_mail(); // Warning.
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 @@ -147,7 +147,6 @@
108 => 1,
109 => 1,
112 => 1,
115 => 1,
118 => 1,
119 => 1,
123 => 1,
Expand Down
4 changes: 0 additions & 4 deletions WordPress-VIP-Go/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,6 @@
<rule ref="WordPressVIPMinimum.Security.PHPFilterFunctions">
<severity>10</severity>
</rule>
<rule ref="WordPressVIPMinimum.Functions.RestrictedFunctions.dbDelta_dbdelta">
<type>warning</type>
<severity>7</severity>
</rule>
<rule ref="WordPressVIPMinimum.Functions.RestrictedFunctions.wp_mail_wp_mail">
<severity>7</severity>
</rule>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,6 @@ public function getGroups() {
'attachment_url_to_postid',
],
],
'dbDelta' => [
'type' => 'error',
'message' => 'All database modifications have to approved by the WordPress.com VIP team.',
'functions' => [
'dbDelta',
],
],
// @link https://docs.wpvip.com/technical-references/code-review/vip-notices/#h-switch_to_blog
'switch_to_blog' => [
'type' => 'warning',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ flush_rules(); // Ok - not in global class.
$wp_write->flush_rules(); // Ok - not in global class $wp_rewrite.
$wp_rewrite->flush_rules(); // Error.

db_delta(); // Ok - similarly-named function to dbDelta().
dbDelta(); // Error.



switch_blog(); // Ok - similarly-named function to switch_to_blog().
switch_to_blog( $blogid ); // Warning.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public function getErrorList() {
43 => 1,
46 => 1,
50 => 1,
53 => 1,
59 => 1,
62 => 1,
75 => 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 @@ -320,7 +320,7 @@ wpcom_vip_irc(); // Error.
flush_rewrite_rules(); // Error.
$wp_rewrite->flush_rules(); // Error.
attachment_url_to_postid( $url ); // Error.
dbDelta(); // Error.

switch_to_blog( $blogid ); // Warning.
get_page_by_title( $page_title ); // Error.
url_to_postid( $url ); // 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 @@ -92,7 +92,6 @@
320 => 1,
321 => 1,
322 => 1,
323 => 1,
325 => 1,
326 => 1,
327 => 1,
Expand Down

0 comments on commit e1eb7c9

Please sign in to comment.