From 1ff4349ee591519d9cc1c69d37bd3d2b5890ad02 Mon Sep 17 00:00:00 2001 From: azaozz Date: Fri, 26 Dec 2008 22:35:08 +0000 Subject: [PATCH] Fix debug notices for bulk edit, fixes #8707 for trunk git-svn-id: http://svn.automattic.com/wordpress/trunk@10256 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 ) {