summaryrefslogtreecommitdiffstats
path: root/wp-admin/admin-db.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-admin/admin-db.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-admin/admin-db.php')
-rw-r--r--wp-admin/admin-db.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/wp-admin/admin-db.php b/wp-admin/admin-db.php
index 1cf390b..becc711 100644
--- a/wp-admin/admin-db.php
+++ b/wp-admin/admin-db.php
@@ -473,9 +473,11 @@ function wp_set_link_cats($link_ID = 0, $link_categories = array()) {
if ($add_cats) {
foreach ($add_cats as $new_cat) {
- $wpdb->query("
- INSERT INTO $wpdb->link2cat (link_id, category_id)
- VALUES ($link_ID, $new_cat)");
+ $new_cat = (int) $new_cat;
+ if ( !empty($new_cat) )
+ $wpdb->query("
+ INSERT INTO $wpdb->link2cat (link_id, category_id)
+ VALUES ('$link_ID', '$new_cat')");
}
}