From f4980c0b00de3c8aa889fac2dd84c9f2ce224681 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Fri, 26 Dec 2008 22:35:08 +0000 Subject: [PATCH] Fix debug notices for bulk edit, fixes #8707 for trunk git-svn-id: https://develop.svn.wordpress.org/trunk@10256 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/post.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index da03f26de5..de18643f25 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -228,7 +228,7 @@ function bulk_edit_posts( $post_data = null ) { if ( empty($post_data) ) $post_data = &$_POST; - if ( 'page' == $post_data['post_type'] ) { + if ( isset($post_data['post_type']) && 'page' == $post_data['post_type'] ) { if ( ! current_user_can( 'edit_pages' ) ) wp_die( __('You are not allowed to edit pages.') ); } else { @@ -236,7 +236,7 @@ function bulk_edit_posts( $post_data = null ) { wp_die( __('You are not allowed to edit posts.') ); } - $post_IDs = array_map( intval, (array) $post_data['post'] ); + $post_IDs = array_map( 'intval', (array) $post_data['post'] ); $reset = array( 'post_author', 'post_status', 'post_password', 'post_parent', 'page_template', 'comment_status', 'ping_status', 'keep_private', 'tags_input', 'post_category', 'sticky' ); foreach ( $reset as $field ) {