From 3fa51b528a1aa0f19a574d6bdb5c6a032426e90d Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 20 Jan 2006 21:07:10 +0000 Subject: [PATCH] Make sure we have an array. Props Ozh and David House. fixes #2313 git-svn-id: http://svn.automattic.com/wordpress/trunk@3467 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/classes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/classes.php b/wp-includes/classes.php index 76587d471..37c9c0595 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -372,13 +372,13 @@ class WP_Query { $all_page_ids = get_all_page_ids(); $reqpage = 0; - foreach ( $all_page_ids as $page_id ) { + if (is_array($all_page_ids)) { foreach ( $all_page_ids as $page_id ) { $page = get_page($page_id); if ( $page->fullpath == $page_path ) { $reqpage = $page_id; break; } - } + } } $where .= " AND (ID = '$reqpage')"; } elseif ('' != $q['attachment']) {