mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
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:
parent
e5d1bed10c
commit
8f5144ccfc
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user