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

git-svn-id: https://develop.svn.wordpress.org/trunk@2399 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2005-03-02 15:38:09 +00:00
parent 7f5937bc6b
commit 3026e1a434
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'];