From 31a016614de4defba498811f82db487966f54c2e Mon Sep 17 00:00:00 2001 From: markjaquith Date: Wed, 31 Aug 2011 06:46:16 +0000 Subject: [PATCH] Cast to array in get_page_by_path() foreach git-svn-id: http://svn.automattic.com/wordpress/trunk@18627 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index cf087028e1..d8e00af458 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -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 ) {