Make WordPress Core

Opened 9 months ago

Last modified 7 months ago

#49279 new enhancement

Missing spaces

Reported by: jillebehm Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.3.2
Component: Query Keywords: dev-feedback
Focuses: coding-standards Cc:

Description (last modified by SergeyBiryukov)

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'] );

Change History (1)

#1 @SergeyBiryukov
7 months ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.