Code Duplication    Length = 8-9 lines in 2 locations

wp-includes/class-wp-xmlrpc-server.php 2 locations

@@ 5042-5050 (lines=9) @@
5039
		}
5040
5041
		$post_category = array();
5042
		if ( isset( $content_struct['categories'] ) ) {
5043
			$catnames = $content_struct['categories'];
5044
5045
			if ( is_array($catnames) ) {
5046
				foreach ($catnames as $cat) {
5047
					$post_category[] = get_cat_ID($cat);
5048
				}
5049
			}
5050
		}
5051
5052
		$postdata = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'comment_status', 'ping_status', 'to_ping', 'post_type', 'post_name', 'post_password', 'post_parent', 'menu_order', 'tags_input', 'page_template');
5053
@@ 5332-5339 (lines=8) @@
5329
			$post_content = $content_struct['description'];
5330
5331
		$post_category = array();
5332
		if ( isset( $content_struct['categories'] ) ) {
5333
			$catnames = $content_struct['categories'];
5334
			if ( is_array($catnames) ) {
5335
				foreach ($catnames as $cat) {
5336
					$post_category[] = get_cat_ID($cat);
5337
				}
5338
			}
5339
		}
5340
5341
		if ( isset( $content_struct['mt_excerpt'] ) )
5342
			$post_excerpt =  $content_struct['mt_excerpt'];