From b6b4c04371617d922b672b196e18a7b7cf2ea123 Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@2509 602fd350-edb4-49c9-b593-d223f7449a82 --- 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();