diff --git a/wp-includes/template-functions-category.php b/wp-includes/template-functions-category.php index d7c70581a9..82a9267847 100644 --- a/wp-includes/template-functions-category.php +++ b/wp-includes/template-functions-category.php @@ -20,6 +20,8 @@ function get_the_category($id = false) { if (!empty($categories)) sort($categories); + else + $categories = array(); return $categories; }