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

git-svn-id: https://develop.svn.wordpress.org/trunk@6741 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-02-06 21:40:52 +00:00
parent 452f423faf
commit 55be48f97f
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);