From 9bb0b895da2389f8b9da6ddb8e96d03d5b504fc5 Mon Sep 17 00:00:00 2001 From: nacin Date: Tue, 1 May 2012 21:03:50 +0000 Subject: [PATCH] Kill all notices in XML-RPC found when running the test suite with WP_DEBUG. see [UT706], [UT707]. see #20566. git-svn-id: http://core.svn.wordpress.org/trunk@20671 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-xmlrpc-server.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/wp-includes/class-wp-xmlrpc-server.php b/wp-includes/class-wp-xmlrpc-server.php index 3a0134e9cc..e8c27180fb 100644 --- a/wp-includes/class-wp-xmlrpc-server.php +++ b/wp-includes/class-wp-xmlrpc-server.php @@ -524,7 +524,7 @@ class wp_xmlrpc_server extends IXR_Server { 'hierarchical' => (bool) $taxonomy->hierarchical, 'public' => (bool) $taxonomy->public, 'show_ui' => (bool) $taxonomy->show_ui, - '_builtin' => (bool) $taxnomy->_builtin, + '_builtin' => (bool) $taxonomy->_builtin, ); if ( in_array( 'labels', $fields ) ) @@ -534,7 +534,7 @@ class wp_xmlrpc_server extends IXR_Server { $_taxonomy['cap'] = (array) $taxonomy->cap; if ( in_array( 'object_types', $fields ) ) - $_taxonomy['taxonomies'] = array_unique( (array) $taxonomy->object_type ); + $_taxonomy['object_type'] = array_unique( (array) $taxonomy->object_type ); return apply_filters( 'xmlrpc_prepare_taxonomy', $_taxonomy, $taxonomy, $fields ); } @@ -902,7 +902,7 @@ class wp_xmlrpc_server extends IXR_Server { if ( $post_data['post_type'] == 'post' ) { // Private and password-protected posts cannot be stickied. - if ( $post_data['status'] == 'private' || ! empty( $post_data['post_password'] ) ) { + if ( $post_data['post_status'] == 'private' || ! empty( $post_data['post_password'] ) ) { // Error if the client tried to stick the post, otherwise, silently unstick. if ( ! empty( $post_data['sticky'] ) ) return new IXR_Error( 401, __( 'Sorry, you cannot stick a private post.' ) ); @@ -3947,11 +3947,11 @@ class wp_xmlrpc_server extends IXR_Server { $this->escape($args); - $post_ID = (int) $args[0]; - $username = $args[1]; - $password = $args[2]; + $post_ID = (int) $args[0]; + $username = $args[1]; + $password = $args[2]; $content_struct = $args[3]; - $publish = $args[4]; + $publish = isset( $args[4] ) ? $args[4] : 0; if ( ! $user = $this->login($username, $password) ) return $this->error; @@ -4105,8 +4105,7 @@ class wp_xmlrpc_server extends IXR_Server { if ( isset( $content_struct['mt_excerpt'] ) ) $post_excerpt = $content_struct['mt_excerpt']; - if ( isset( $content_struct['mt_text_more'] ) ) - $post_more = $content_struct['mt_text_more']; + $post_more = isset( $content_struct['mt_text_more'] ) ? $content_struct['mt_text_more'] : null; $post_status = $publish ? 'publish' : 'draft'; if ( isset( $content_struct["{$post_type}_status"] ) ) {