summaryrefslogtreecommitdiffstats
path: root/wp-includes/post.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-03-13 13:49:53 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-03-13 13:49:53 +0000
commit9ca97330d7857ca0a1c96342b9cf0b2e511afc72 (patch)
treebadf749634810b430604f04c779ed2b1b3fbeeb7 /wp-includes/post.php
parent0d4bfdbf8c17706b57e92838d1599cb9e82c893b (diff)
downloadwordpress-mu-9ca97330d7857ca0a1c96342b9cf0b2e511afc72.tar.gz
wordpress-mu-9ca97330d7857ca0a1c96342b9cf0b2e511afc72.tar.xz
wordpress-mu-9ca97330d7857ca0a1c96342b9cf0b2e511afc72.zip
WP Merge to rev 5032
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@916 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/post.php')
-rw-r--r--wp-includes/post.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/wp-includes/post.php b/wp-includes/post.php
index 810ad31..ab7c49c 100644
--- a/wp-includes/post.php
+++ b/wp-includes/post.php
@@ -804,10 +804,11 @@ function wp_set_post_categories($post_ID = 0, $post_categories = array()) {
if ($add_cats) {
foreach ($add_cats as $new_cat) {
+ $new_cat = (int) $new_cat;
if ( !empty($new_cat) )
$wpdb->query("
INSERT INTO $wpdb->post2cat (post_id, category_id)
- VALUES ($post_ID, $new_cat)");
+ VALUES ('$post_ID', '$new_cat')");
}
}