diff --git a/wp-includes/post.php b/wp-includes/post.php
index 03f31ef..2f92af0 100644
a
|
b
|
function wp_set_post_categories($post_ID = 0, $post_categories = array()) { |
3192 | 3192 | $post_type = get_post_type( $post_ID ); |
3193 | 3193 | $post_status = get_post_status( $post_ID ); |
3194 | 3194 | // If $post_categories isn't already an array, make it one: |
3195 | | if ( !is_array($post_categories) || empty($post_categories) ) { |
| 3195 | $post_categories = (array) $post_categories; |
| 3196 | if ( empty( $post_categories ) ) { |
3196 | 3197 | if ( 'post' == $post_type && 'auto-draft' != $post_status ) |
3197 | 3198 | $post_categories = array( get_option('default_category') ); |
3198 | 3199 | else |