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
This commit is contained in:
parent
042f170ed8
commit
3fa51b528a
|
@ -372,13 +372,13 @@ class WP_Query {
|
||||||
|
|
||||||
$all_page_ids = get_all_page_ids();
|
$all_page_ids = get_all_page_ids();
|
||||||
$reqpage = 0;
|
$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);
|
$page = get_page($page_id);
|
||||||
if ( $page->fullpath == $page_path ) {
|
if ( $page->fullpath == $page_path ) {
|
||||||
$reqpage = $page_id;
|
$reqpage = $page_id;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
} }
|
||||||
|
|
||||||
$where .= " AND (ID = '$reqpage')";
|
$where .= " AND (ID = '$reqpage')";
|
||||||
} elseif ('' != $q['attachment']) {
|
} elseif ('' != $q['attachment']) {
|
||||||
|
|
Loading…
Reference in New Issue