From 9ca97330d7857ca0a1c96342b9cf0b2e511afc72 Mon Sep 17 00:00:00 2001 From: donncha Date: Tue, 13 Mar 2007 13:49:53 +0000 Subject: WP Merge to rev 5032 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@916 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-includes/post.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'wp-includes/post.php') 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')"); } } -- cgit