Make WordPress Core

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#4834 closed defect (bug) (fixed)

get_permalink() shouldn't work for posts that don't exist

Reported by: viper007bond's profile Viper007Bond Owned by:
Milestone: 2.3 Priority: low
Severity: minor Version: 2.3
Component: Template Keywords: has-patch 2nd-opinion
Focuses: Cc:

Description

get_permalink('bananas') shouldn't return a URL (it currently does). Attached patch adds a quick check to see that the entered post ID actually exists and returns FALSE if it doesn't.

Attachments (1)

link-template.patch (420 bytes) - added by Viper007Bond 18 years ago.

Download all attachments as: .zip

Change History (3)

#1 @ryan
18 years ago

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

(In [5956]) Don't return permalink for non-existent post. Props Viper007Bond. fixes #4834

#2 @westi
18 years ago

  • Milestone changed from 2.4 to 2.3
Note: See TracTickets for help on using tickets.