Make WordPress Core


Ignore:
Timestamp:
08/15/2007 10:31:19 PM (17 years ago)
Author:
ryan
Message:

Display error message when attempting to edit post or page IDs that do not exist. Props Viper007Bond. fixes #4737

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/post.php

    r5808 r5875  
    4848    $post_ID = $p = (int) $_GET['post'];
    4949    $post = get_post($post_ID);
     50
     51    if ( empty($post->ID) ) wp_die( __("You attempted to edit a post that doesn't exist. Perhaps it was deleted?") );
    5052
    5153    if ( 'page' == $post->post_type ) {
Note: See TracChangeset for help on using the changeset viewer.