WordPress.org

Make WordPress Core

Ticket #4737: checkid2a.patch

File checkid2a.patch, 1.0 KB (added by Viper007Bond, 11 years ago)

Less technical error message

  • wp-admin/page.php

     
    4545        $page_ID = $post_ID = $p = (int) $_GET['post'];
    4646        $post = get_post_to_edit($page_ID);
    4747
     48        if ( empty($post->ID) ) wp_die( sprintf( __("You attempted to edit a %s that doesn't exist. Perhaps it was deleted?"), __('page') ) );
     49
    4850        if ( 'post' == $post->post_type ) {
    4951                wp_redirect("post.php?action=edit&post=$post_ID");
    5052                exit();
  • wp-admin/post.php

     
    4848        $post_ID = $p = (int) $_GET['post'];
    4949        $post = get_post($post_ID);
    5050
     51        if ( empty($post->ID) ) wp_die( sprintf( __("You attempted to edit a %s that doesn't exist. Perhaps it was deleted?"), __('post') ) );
     52
    5153        if ( 'page' == $post->post_type ) {
    5254                wp_redirect("page.php?action=edit&post=$post_ID");
    5355                exit();