Make WordPress Core

Ticket #16550: ticket.16550.diff

File ticket.16550.diff, 626 bytes (added by ptahdunbar, 14 years ago)
  • post.php

     
    29032903        $post_ID = (int) $post_ID;
    29042904        $post_type = get_post_type( $post_ID );
    29052905        $post_status = get_post_status( $post_ID );
    2906         // If $post_categories isn't already an array, make it one:
    2907         if ( !is_array($post_categories) || empty($post_categories) ) {
     2906        $post_categories = (array) $post_categories;
     2907        if ( empty($post_categories) ) {
    29082908                if ( 'post' == $post_type && 'auto-draft' != $post_status )
    29092909                        $post_categories = array( get_option('default_category') );
    29102910                else