Opened 5 years ago
Closed 4 years ago
#49279 closed enhancement (fixed)
Missing spaces in parentheses in WP_Meta_Query::get_sql_for_clause()
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.8 | Priority: | normal |
Severity: | trivial | Version: | 5.3.2 |
Component: | Query | Keywords: | dev-feedback good-first-bug has-patch |
Focuses: | coding-standards | Cc: |
Description (last modified by )
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'] ); }
Attachments (1)
Change History (8)
#3
@
4 years ago
- Keywords has-patch added
Hi! I have added the missing spaces in /wp-includes/class-wp-meta-query.php. Please let me know if the changes look good.
#5
@
4 years ago
- Milestone changed from Awaiting Review to 5.8
- Severity changed from normal to trivial
Note: See
TracTickets for help on using
tickets.
Added missing spaces