More clean_url and int casts for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@5119 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2007-03-27 23:45:41 +00:00
parent 8a15ffc657
commit 51cd99bb02
4 changed files with 4 additions and 1 deletions

View File

@@ -150,6 +150,7 @@ function &get_category(&$category, $output = OBJECT) {
wp_cache_add($category->cat_ID, $category, 'category');
$_category = $category;
} else {
$category = (int) $category;
if ( ! $_category = wp_cache_get($category, 'category') ) {
$_category = $wpdb->get_row("SELECT * FROM $wpdb->categories WHERE cat_ID = '$category' LIMIT 1");
wp_cache_set($category, $_category, 'category');