[buddypress-trac] [BuddyPress Trac] #7248: include = [ 0 ] should result in a "no results" query in `BP_User_Query`

buddypress-trac noreply at wordpress.org
Tue Sep 6 19:34:01 UTC 2016


#7248: include = [ 0 ] should result in a "no results" query in `BP_User_Query`
-----------------------------------+---------------------------
 Reporter:  boonebgorges           |       Owner:  boonebgorges
     Type:  defect (bug)           |      Status:  closed
 Priority:  high                   |   Milestone:  2.7
Component:  Core                   |     Version:
 Severity:  normal                 |  Resolution:  fixed
 Keywords:  has-patch 2nd-opinion  |
-----------------------------------+---------------------------
Changes (by boonebgorges):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"11067"]:
 {{{
 #!CommitTicketReference repository="" revision="11067"
 Bail early if an array containing only 0 is passed to 'include' in user
 queries.

 When 'include' is `[ 0 ]` or [ '0' ]`, there's no reason to run a costly
 SQL query - we can immediately report no results.

 Fixes #7248.
 }}}

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7248#comment:5>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list