WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#16575 closed defect (bug) (duplicate)

get_posts() just broke

Reported by: johnbillion Owned by:
Milestone: Priority: normal
Severity: blocker Version: 3.1
Component: Query Keywords:
Focuses: Cc:

Description

Probably related to r17451 (see #16545).

get_posts() has broken when page_on_front == true.

Example:

$posts = get_posts(array(
	'post_type' => 'post'
));

print_r($posts);

You'll get an empty array because the page_id query var is being set somewhere.

Attachments (1)

16575.diff (862 bytes) - added by ryan 6 years ago.

Download all attachments as: .zip

Change History (5)

#1 @nacin
6 years ago

  • Milestone changed from Awaiting Review to 3.1

#2 @ryan
6 years ago

Confirmed. Trying to track down the problem.

#3 @ryan
6 years ago

Some parts of parse_query() reparse $query, which is no longer passed. Back to the drawing board.

#4 @nacin
6 years ago

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

Closing as duplicate of #16545.

@ryan
6 years ago

Note: See TracTickets for help on using tickets.