Make sure category list is actually a list. http://mosquito.wordpress.org/view.php?id=988

git-svn-id: http://svn.automattic.com/wordpress/trunk@2399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-03-02 15:38:09 +00:00
parent e276f13b35
commit 6ff955829c
1 changed files with 4 additions and 2 deletions

View File

@ -523,7 +523,7 @@ class wp_xmlrpc_server extends IXR_Server {
logIO('O', 'Post cats: ' . printr($catnames,true));
$post_category = array();
if ($catnames) {
if (is_array($catnames)) {
foreach ($catnames as $cat) {
$post_category[] = get_cat_ID($cat);
}
@ -576,10 +576,12 @@ class wp_xmlrpc_server extends IXR_Server {
$post_content = apply_filters( 'content_save_pre', $content_struct['description'] );
$catnames = $content_struct['categories'];
if ($catnames) {
if (is_array($catnames)) {
foreach ($catnames as $cat) {
$post_category[] = get_cat_ID($cat);
}
} else {
$post_category[] = 1;
}
$post_excerpt = $content_struct['mt_excerpt'];