Make WordPress Core


Ignore:
Timestamp:
07/05/2019 05:42:57 AM (5 years ago)
Author:
pento
Message:

Coding Standards: Fix all WordPress.DB.PreparedSQLPlaceholders issues.

See #47632.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-comment-query.php

    r45590 r45603  
    772772            foreach ( $post_fields as $field_name => $field_value ) {
    773773                // $field_value may be an array.
    774                 $esses                                     = array_fill( 0, count( (array) $field_value ), '%s' );
     774                $esses = array_fill( 0, count( (array) $field_value ), '%s' );
     775
     776                // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare
    775777                $this->sql_clauses['where'][ $field_name ] = $wpdb->prepare( " {$wpdb->posts}.{$field_name} IN (" . implode( ',', $esses ) . ')', $field_value );
    776778            }
     
    793795                $join_posts_table = true;
    794796
    795                 $esses                                     = array_fill( 0, count( $q_values ), '%s' );
     797                $esses = array_fill( 0, count( $q_values ), '%s' );
     798
     799                // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare
    796800                $this->sql_clauses['where'][ $field_name ] = $wpdb->prepare( " {$wpdb->posts}.{$field_name} IN (" . implode( ',', $esses ) . ')', $q_values );
    797801            }
Note: See TracChangeset for help on using the changeset viewer.