Skip to content

Commit

Permalink
Fix query where object was mistakenly used in WHERE clause
Browse files Browse the repository at this point in the history
Issue cased in e9541a8
  • Loading branch information
pattonwebz committed Jun 27, 2024
1 parent 594da0a commit 809aecc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion admin/class-ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ function ( $value ) {
// For small batches of IDs, we can just loop through.
foreach ( $ids as $id ) {
// phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Safe variable used for table name, caching not required for one time operation.
$wpdb->query( $wpdb->prepare( 'UPDATE %i SET ignre = %d, ignre_user = %d, ignre_date = %s, ignre_comment = %s, ignre_global = %d WHERE siteid = %d and object = %d', $table_name, $ignre, $ignre_user, $ignre_date, $ignre_comment, $ignore_global, $siteid, $id ) );
$wpdb->query( $wpdb->prepare( 'UPDATE %i SET ignre = %d, ignre_user = %d, ignre_date = %s, ignre_comment = %s, ignre_global = %d WHERE siteid = %d and id = %d', $table_name, $ignre, $ignre_user, $ignre_date, $ignre_comment, $ignore_global, $siteid, $id ) );
}
}

Expand Down

0 comments on commit 809aecc

Please sign in to comment.