Code Duplication    Length = 5-5 lines in 2 locations

wp-includes/post.php 2 locations

@@ 2999-3003 (lines=5) @@
2996
	 * an empty post name.
2997
	 */
2998
	if ( empty($post_name) ) {
2999
		if ( !in_array( $post_status, array( 'draft', 'pending', 'auto-draft' ) ) ) {
3000
			$post_name = sanitize_title($post_title);
3001
		} else {
3002
			$post_name = '';
3003
		}
3004
	} else {
3005
		// On updates, we need to check to see if it's using the old, fixed sanitization context.
3006
		$check_name = sanitize_title( $post_name, '', 'old-save' );
@@ 3042-3046 (lines=5) @@
3039
	}
3040
3041
	if ( empty( $postarr['post_date_gmt'] ) || '0000-00-00 00:00:00' == $postarr['post_date_gmt'] ) {
3042
		if ( ! in_array( $post_status, array( 'draft', 'pending', 'auto-draft' ) ) ) {
3043
			$post_date_gmt = get_gmt_from_date( $post_date );
3044
		} else {
3045
			$post_date_gmt = '0000-00-00 00:00:00';
3046
		}
3047
	} else {
3048
		$post_date_gmt = $postarr['post_date_gmt'];
3049
	}