From 842d9bc5cfbc851a1449e633849c65804fbeb2a4 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sat, 1 Nov 2014 01:28:18 +0000 Subject: [PATCH] In `wp_xmlrpc_server->_prepare_comment()`, `$comment_date` is set internally but never used. See #30224. git-svn-id: https://develop.svn.wordpress.org/trunk@30137 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-xmlrpc-server.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/wp-includes/class-wp-xmlrpc-server.php b/src/wp-includes/class-wp-xmlrpc-server.php index 3a792c21bb..ab44a42221 100644 --- a/src/wp-includes/class-wp-xmlrpc-server.php +++ b/src/wp-includes/class-wp-xmlrpc-server.php @@ -972,18 +972,17 @@ class wp_xmlrpc_server extends IXR_Server { */ protected function _prepare_comment( $comment ) { // Format page date. - $comment_date = $this->_convert_date( $comment->comment_date ); $comment_date_gmt = $this->_convert_date_gmt( $comment->comment_date_gmt, $comment->comment_date ); - if ( '0' == $comment->comment_approved ) + if ( '0' == $comment->comment_approved ) { $comment_status = 'hold'; - else if ( 'spam' == $comment->comment_approved ) + } elseif ( 'spam' == $comment->comment_approved ) { $comment_status = 'spam'; - else if ( '1' == $comment->comment_approved ) + } elseif ( '1' == $comment->comment_approved ) { $comment_status = 'approve'; - else + } else { $comment_status = $comment->comment_approved; - + } $_comment = array( 'date_created_gmt' => $comment_date_gmt, 'user_id' => $comment->user_id,