From e1806534a373b625cdef964cf16b8a76c7a71706 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Mon, 23 Nov 2009 08:34:36 -0500 Subject: [PATCH] ensure categories provided to get_posts is in an array --- classes/ComicPressDBInterface.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/classes/ComicPressDBInterface.inc b/classes/ComicPressDBInterface.inc index 4edb12e..2fb2ebe 100644 --- a/classes/ComicPressDBInterface.inc +++ b/classes/ComicPressDBInterface.inc @@ -43,6 +43,8 @@ class ComicPressDBInterface { function get_terminal_post_in_categories($categories, $first = true) { $this->_prepare_wp_query(); + if (!is_array($categories)) { $categories = array($categories); } + $sort_order = $first ? "asc" : "desc"; $terminal_comic_query = new WP_Query(); $terminal_comic_query->query(array(