From 15a525e6dc7cfd23ff270537f94bf9a32ae6010f Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sat, 2 Jul 2005 17:28:06 +0000 Subject: [PATCH] Make sure cat list is an array. Props: Peter Westwood git-svn-id: https://develop.svn.wordpress.org/trunk@2683 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions-post.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-includes/functions-post.php b/wp-includes/functions-post.php index 636758b15a..c3289d9958 100644 --- a/wp-includes/functions-post.php +++ b/wp-includes/functions-post.php @@ -229,6 +229,9 @@ function wp_get_post_cats($blogid = '1', $post_ID = 0) { $result = $wpdb->get_col($sql); + if ( !$result ) + $result = array(); + return array_unique($result); }