WordPress.org

Make WordPress Core

Ticket #13246: 14433.diff

File 14433.diff, 479 bytes (added by jorbin, 8 years ago)
  • wp-includes/post.php

     
    20962096                        $post_category = array();
    20972097        }
    20982098
     2099        // Make sure the category is set in [0] if there is only one
     2100        if ( 1 == count($post_category) && empty( $post_category[0] ) )
     2101                $post_category[0] = array_shift($post_category);
     2102
    20992103        if ( empty($post_author) )
    21002104                $post_author = $user_ID;
    21012105