[wp-trac] [WordPress Trac] #17066: $wp_query->found_posts is set to 0 with posts_per_page=-1

WordPress Trac wp-trac at lists.automattic.com
Wed Apr 6 19:32:50 UTC 2011


#17066: $wp_query->found_posts is set to 0 with posts_per_page=-1
--------------------------+------------------------------
 Reporter:  patrik bona   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Query         |     Version:  3.1
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by nacin):

 http://core.trac.wordpress.org/browser/trunk/wp-
 includes/query.php?rev=17610#L2633

 If $limits is empty, we should do a count() on $this->posts. Unsure
 whether we should aim to avoid the count when no_found_rows is true, as I
 imagine that's just looking out for the extra query.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17066#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list