From c2835f72663d56f5e62ef101b434f28a10d6ea6b Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@3467 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 76587d4715..37c9c05957 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']) {