WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#5019 closed defect (bug) (fixed)

get_next_post() and get_previous_post() are too trusting

Reported by: mdawaffe Owned by: mdawaffe
Milestone: 2.3 Priority: normal
Severity: normal Version: 2.3
Component: General Keywords: has-patch commit
Focuses: Cc:

Description

Both should bail out if there's no current global $post variable to reference.

Attachments (1)

5019.diff (758 bytes) - added by mdawaffe 7 years ago.

Download all attachments as: .zip

Change History (4)

mdawaffe7 years ago

comment:1 mdawaffe7 years ago

  • Keywords has-patch commit added
  • Owner changed from anonymous to mdawaffe
  • Status changed from new to assigned

comment:2 Viper007Bond7 years ago

Looks good.

comment:3 ryan7 years ago

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

(In [6142]) Bail if post is empty. Props mdawaffe. fixes #5019

Note: See TracTickets for help on using tickets.