X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/fa11948979fd6a4ea5705dc613b239699a459db3..53a5df18dd17a11c18781e78349feb3e139096b4:/wp-includes/category-template.php diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index 27b8bf22..57f7cb9a 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -232,6 +232,9 @@ function get_the_category_list( $separator = '', $parents='', $post_id = false ) * @return bool True if the current post is in any of the given categories. */ function in_category( $category, $post = null ) { + if ( empty( $category ) ) + return false; + return has_category( $category, $post ); }