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:
parent
185dbb4e7a
commit
b6b4c04371
|
@ -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();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue