From 56c304f8bbd6288a6745f877b3233d1efe01f729 Mon Sep 17 00:00:00 2001 From: ryan Date: Sat, 2 Jul 2005 17:28:06 +0000 Subject: [PATCH] Make sure cat list is an array. Props: Peter Westwood git-svn-id: http://svn.automattic.com/wordpress/trunk@2683 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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); }