Cast to array in get_page_by_path() foreach

git-svn-id: https://develop.svn.wordpress.org/trunk@18627 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2011-08-31 06:46:16 +00:00
parent 3e49774791
commit 8094c89b39
1 changed files with 1 additions and 1 deletions

View File

@ -3161,7 +3161,7 @@ function get_page_by_path($page_path, $output = OBJECT, $post_type = 'page') {
$revparts = array_reverse( $parts );
$foundid = 0;
foreach ( $pages as $page ) {
foreach ( (array) $pages as $page ) {
if ( $page->post_name == $revparts[0] ) {
$count = 0;
if ( $page->post_parent != 0 ) {