[wp-trac] [WordPress Trac] #32756: Notice in `WP_Tax_Query::get_sql_for_clause()`

WordPress Trac noreply at wordpress.org
Tue Jun 23 01:09:49 UTC 2015


#32756: Notice in `WP_Tax_Query::get_sql_for_clause()`
--------------------------+-----------------------------
 Reporter:  dlh           |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Taxonomy      |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 `WP_Tax_Query::get_sql_for_clause()` provides a default empty string for
 the `$join` variable, but not for `$where`.

 This can lead to a undefined-variable notice from `$sql['where'][] =
 $where` if the received `$clause['operator']` isn't covered in the
 method's conditionals.

 The attached patch would create `$where` with `$join`.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32756>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list