mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user