Skip to content

Commit 259d1f9

Browse files
Coding Standards: Correct two ignore annotations for WordPress.DB.PreparedSQL.
The `WordPress.DB.PreparedSQL` sniff contains two different error messages, which initially shared the same error code. A unique error code for the second message was added in WPCS 2.0.0. Reference: [WordPress/WordPress-Coding-Standards#1601 PreparedSQL: use unique errorcode for messages]. Follow-up to [43628], [43630], [43654], [44472]. Props rodrigosprimo. See #64627. git-svn-id: https://develop.svn.wordpress.org/trunk@61615 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 6cb574b commit 259d1f9

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/wp-admin/includes/schema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ function populate_options( array $options = array() ) {
588588
);
589589

590590
$keys = "'" . implode( "', '", array_keys( $options ) ) . "'";
591-
$existing_options = $wpdb->get_col( "SELECT option_name FROM $wpdb->options WHERE option_name in ( $keys )" ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
591+
$existing_options = $wpdb->get_col( "SELECT option_name FROM $wpdb->options WHERE option_name in ( $keys )" ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
592592

593593
$insert = '';
594594

src/wp-includes/ms-site.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ function wp_uninitialize_site( $site_id ) {
832832
$drop_tables = apply_filters( 'wpmu_drop_tables', $tables, $site->id );
833833

834834
foreach ( (array) $drop_tables as $table ) {
835-
$wpdb->query( "DROP TABLE IF EXISTS `$table`" ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
835+
$wpdb->query( "DROP TABLE IF EXISTS `$table`" ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
836836
}
837837

838838
/**

0 commit comments

Comments
 (0)