WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #49279


Ignore:
Timestamp:
04/03/2020 05:25:22 PM (8 months ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #49279 – Description

    initial v1  
    11In /wp-includes/class-wp-meta-query.php on line 563 and 565 a space is missing between the opening parenthesis and $this->primary_table. This is not really a big thing, but the space is there in all the other code that use parentheses.
    22
    3 I noticed this when I tried to parse the JOIN statements mentioned in https://core.trac.wordpress.org/ticket/49278, since I couldn't parse the correct 'words', because the parenthesis is now part of a 'word instead of a separate 'word'.
     3I noticed this when I tried to parse the JOIN statements mentioned in #49278, since I couldn't parse the correct 'words', because the parenthesis is now part of a 'word instead of a separate 'word'.
    44
    55{{{
    66if ( 'LIKE' === $meta_compare_key ) {
    7                                         $join .= $wpdb->prepare( " ON ($this->primary_table.$this->primary_id_column = $alias.$this->meta_id_column AND $alias.meta_key LIKE %s )", '%' . $wpdb->esc_like( $clause['key'] ) . '%' );
    8                                 } else {
    9                                         $join .= $wpdb->prepare( " ON ($this->primary_table.$this->primary_id_column = $alias.$this->meta_id_column AND $alias.meta_key = %s )", $clause['key'] );
    10                                 }
     7        $join .= $wpdb->prepare( " ON ($this->primary_table.$this->primary_id_column = $alias.$this->meta_id_column AND $alias.meta_key LIKE %s )", '%' . $wpdb->esc_like( $clause['key'] ) . '%' );
     8} else {
     9        $join .= $wpdb->prepare( " ON ($this->primary_table.$this->primary_id_column = $alias.$this->meta_id_column AND $alias.meta_key = %s )", $clause['key'] );
     10}
    1111}}}