Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#15150 closed defect (bug) (fixed)

numberposts default in get_posts is overriding posts_per_page argument

Reported by: bobbyblade Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.1
Component: General Keywords: has-patch
Focuses: Cc:


In the get_posts function there is currently a bug where if you specify the posts_per_page argument it will be overridden due to the numberposts in the default argument set.

Attachments (1)

post.php.diff (579 bytes) - added by bobbyblade 5 years ago.
post.php get_posts fix

Download all attachments as: .zip

Change History (3)

@bobbyblade5 years ago

post.php get_posts fix

comment:1 @scribu5 years ago

  • Milestone changed from Awaiting Review to 3.1

comment:2 @scribu5 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [15852]) Don't stomp on posts_per_page in get_posts(). Props bobbyblade. Fixes #15150

Note: See TracTickets for help on using tickets.