From 685eeb94f9db50bdff0ccae6a3c1d25bbf612033 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 27 Jul 2004 14:58:30 +0000 Subject: [PATCH] Quote $id in get_the_category() db query. Patch from MCincubus for bug 0000191. git-svn-id: https://develop.svn.wordpress.org/trunk@1486 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/template-functions-category.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/template-functions-category.php b/wp-includes/template-functions-category.php index 7105690344..acd0de94c8 100644 --- a/wp-includes/template-functions-category.php +++ b/wp-includes/template-functions-category.php @@ -13,7 +13,7 @@ function get_the_category($id = false) { $categories = $wpdb->get_results(" SELECT category_id, cat_name, category_nicename, category_description, category_parent FROM $wpdb->categories, $wpdb->post2cat - WHERE $wpdb->post2cat.category_id = cat_ID AND $wpdb->post2cat.post_id = $id + WHERE $wpdb->post2cat.category_id = cat_ID AND $wpdb->post2cat.post_id = '$id' "); return $categories;