[wp-trac] [WordPress Trac] #43630: HAVING without GROUP BY in /wp-admin/includes/template.php

WordPress Trac noreply at wordpress.org
Wed Apr 15 05:07:35 UTC 2020


#43630: HAVING without GROUP BY in /wp-admin/includes/template.php
-------------------------------------+------------------------------
 Reporter:  vsvlad                   |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Administration           |     Version:  4.9.4
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  template
-------------------------------------+------------------------------
Changes (by markparnell):

 * keywords:   => has-patch needs-testing


Comment:

 Patch replaces `HAVING` with `AND` as suggested. My own testing supports
 @vsvlad's assertion that the updated query returns the same results.

 I had a look through the codebase and couldn't find any other instances of
 a query containing `HAVING` without `GROUP BY`. This appears to be the
 only case.

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


More information about the wp-trac mailing list