WordPress.org

Make WordPress Core

Ticket #13246: 14431.diff

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

     
    20782078        if ( empty($post_category) || 0 == count($post_category) || !is_array($post_category) ) {
    20792079                // 'post' requires at least one category.
    20802080                if ( 'post' == $post_type )
    2081                         $post_category = array( get_option('default_category') );
     2081                        $post_category = array( 0 => get_option('default_category') );
    20822082                else
    20832083                        $post_category = array();
    20842084        }