From 4bdeac4763d325eab1761c3833d8c496dee7bbf7 Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Sat, 3 Jan 2004 00:37:24 +0000 Subject: [PATCH] Use default category if none specified. git-svn-id: https://develop.svn.wordpress.org/trunk@696 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/post.php b/wp-admin/post.php index e994a2bb02..f201322da4 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -135,7 +135,7 @@ switch($action) { // Insert categories // Check to make sure there is a category, if not just set it to some default - if (!$post_categories) $post_categories = $wpdb->get_var("SELECT cat_ID FROM $tablecategories LIMIT 1"); + if (!$post_categories) $post_categories[] = 1; foreach ($post_categories as $post_category) { // Double check it's not there already $exists = $wpdb->get_row("SELECT * FROM $tablepost2cat WHERE post_id = $post_ID AND category_id = $post_category");