Cast to array in get_page_by_path() foreach

git-svn-id: http://svn.automattic.com/wordpress/trunk@18627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2011-08-31 06:46:16 +00:00
parent 9813047aa0
commit 31a016614d
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 ) {