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
This commit is contained in:
ryan 2005-04-03 05:09:31 +00:00
parent e5d1bed10c
commit 8f5144ccfc
1 changed files with 3 additions and 0 deletions

View File

@ -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();