From 55be48f97f4d43cc1bcfceb3fed08cceb5340296 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 6 Feb 2008 21:40:52 +0000 Subject: [PATCH] Redirect if post not specified. Props lloydbudd. fixes #5754 git-svn-id: https://develop.svn.wordpress.org/trunk@6741 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/post.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wp-admin/post.php b/wp-admin/post.php index 233934e0f3..1010e9fd89 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -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);