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
This commit is contained in:
Ryan Boren 2005-04-03 05:09:31 +00:00
parent 185dbb4e7a
commit b6b4c04371
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) { function &get_category(&$category, $output = OBJECT) {
global $cache_categories, $wpdb; global $cache_categories, $wpdb;
if ( empty($category) )
return null;
if ( ! isset($cache_categories)) if ( ! isset($cache_categories))
update_category_cache(); update_category_cache();