Redirect if post not specified. Props lloydbudd. fixes #5754

git-svn-id: http://svn.automattic.com/wordpress/trunk@6741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-02-06 21:40:52 +00:00
parent bddedf8c3e
commit eabaabd76b
1 changed files with 5 additions and 0 deletions

View File

@ -46,6 +46,11 @@ case 'post':
case 'edit':
$title = __('Edit');
$editing = true;
if ( empty( $_GET['post'] ) ) {
wp_redirect("post.php");
exit();
}
$post_ID = $p = (int) $_GET['post'];
$post = get_post($post_ID);