Make WordPress Core

Opened 8 years ago

Closed 8 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:


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

Attachments (1)

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

Download all attachments as: .zip

Change History (4)

8 years ago

#1 @mdawaffe
8 years ago

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

#2 @Viper007Bond
8 years ago

Looks good.

#3 @ryan
8 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.