[wp-trac] [WordPress Trac] #49279: Missing spaces

WordPress Trac noreply at wordpress.org
Fri Apr 3 17:25:22 UTC 2020


#49279: Missing spaces
--------------------------+-------------------------------
 Reporter:  jillebehm     |       Owner:  (none)
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Query         |     Version:  5.3.2
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |     Focuses:  coding-standards
--------------------------+-------------------------------
Description changed by SergeyBiryukov:

Old description:

> In /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.
>
> 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'.
>
> {{{
> if ( 'LIKE' === $meta_compare_key ) {
>                                         $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'] ) . '%' );
>                                 } else {
>                                         $join .= $wpdb->prepare( " ON
> ($this->primary_table.$this->primary_id_column =
> $alias.$this->meta_id_column AND $alias.meta_key = %s )", $clause['key']
> );
>                                 }
> }}}

New description:

 In /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.

 I 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'.

 {{{
 if ( 'LIKE' === $meta_compare_key ) {
         $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'] ) . '%' );
 } else {
         $join .= $wpdb->prepare( " ON
 ($this->primary_table.$this->primary_id_column =
 $alias.$this->meta_id_column AND $alias.meta_key = %s )", $clause['key']
 );
 }
 }}}

--

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49279#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list