From 8f5144ccfc2448c71fe7adbefc4bfd4d8633b486 Mon Sep 17 00:00:00 2001
From: ryan <ryan@1a063a9b-81f0-0310-95a4-ce76da25c4cd>
Date: Sun, 3 Apr 2005 05:09:31 +0000
Subject: [PATCH] In get_category(), check for empty category id so that we do
 not create a malformed SQL query.

git-svn-id: http://svn.automattic.com/wordpress/trunk@2509 1a063a9b-81f0-0310-95a4-ce76da25c4cd
---
 wp-includes/functions.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/wp-includes/functions.php b/wp-includes/functions.php
index 160d24d4ed..ec307d28ae 100644
--- a/wp-includes/functions.php
+++ b/wp-includes/functions.php
@@ -617,6 +617,9 @@ function &get_page(&$page, $output = OBJECT) {
 function &get_category(&$category, $output = OBJECT) {
 	global $cache_categories, $wpdb;
 
+	if ( empty($category) )
+		return null;
+
 	if ( ! isset($cache_categories))
 		update_category_cache();