WordPress.org

Make WordPress Core

Ticket #4737: checkid2.patch

File checkid2.patch, 1.1 KB (added by Viper007Bond, 7 years ago)

Better L10n support?

  • 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 with an ID that doesn't exist in the database. 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 with an ID that doesn't exist in the database. Perhaps it was deleted?"), __('post') ) ); 
     52 
    5153        if ( 'page' == $post->post_type ) { 
    5254                wp_redirect("page.php?action=edit&post=$post_ID"); 
    5355                exit();