Make WordPress Core

Opened 13 years ago

Closed 12 years ago

#21147 closed defect (bug) (duplicate)

Found posts not filled correctly

Reported by: rahe's profile Rahe Owned by:
Milestone: Priority: normal
Severity: minor Version: 3.4
Component: Query Keywords:
Focuses: Cc:

Description

Hi,

When i perform a custom WP_Query with the query 'fields'=>'ids' the found_posts is always 0 even if i have multiple pages of content like :

$q = new WP_Query( 
  array( 
   'posts_per_page' => 1,
   'fields' => 'ids'
  ) 
); 

var_dump( $q->found_posts );

If i just remove the fields index, the found_posts is correct.

Attachments (1)

fields-found-rows.diff (1.8 KB) - added by wonderboymusic 12 years ago.

Download all attachments as: .zip

Change History (4)

#2 @wonderboymusic
12 years ago

closed #21733 as a dupe. Patch handles all cases anyways. Attached.

#3 @wonderboymusic
12 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Sergey's patch on #14426 does the same thing

Note: See TracTickets for help on using tickets.