From 4aa9fdc0135020eb8744c4608e1c5dc1327099e4 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sun, 27 Feb 2005 04:47:38 +0000 Subject: [PATCH] Make sure get_the_category() returns an array. git-svn-id: https://develop.svn.wordpress.org/trunk@2387 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/template-functions-category.php | 2 ++ 1 file changed, 2 insertions(+) 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; }