Changeset 8572 for trunk/wp-includes/post.php
- Timestamp:
- 08/06/2008 08:31:54 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r8546 r8572 144 144 return $kids; 145 145 } elseif ( $output == ARRAY_A ) { 146 foreach ( $kids as $kid )146 foreach ( (array) $kids as $kid ) 147 147 $weeuns[$kid->ID] = get_object_vars($kids[$kid->ID]); 148 148 return $weeuns; 149 149 } elseif ( $output == ARRAY_N ) { 150 foreach ( $kids as $kid )150 foreach ( (array) $kids as $kid ) 151 151 $babes[$kid->ID] = array_values(get_object_vars($kids[$kid->ID])); 152 152 return $babes; … … 1580 1580 1581 1581 // Update counts for the post's terms. 1582 foreach ( get_object_taxonomies('post') as $taxonomy ) {1582 foreach ( (array) get_object_taxonomies('post') as $taxonomy ) { 1583 1583 $terms = wp_get_object_terms($post_id, $taxonomy, 'fields=tt_ids'); 1584 1584 wp_update_term_count($terms, $taxonomy); … … 1846 1846 1847 1847 $trackback_urls = explode(',', $tb_list); 1848 foreach( $trackback_urls as $tb_url) {1848 foreach( (array) $trackback_urls as $tb_url) { 1849 1849 $tb_url = trim($tb_url); 1850 1850 trackback($tb_url, stripslashes($post_title), $excerpt, $post_id); … … 1927 1927 $leaf_path = sanitize_title(basename($page_paths)); 1928 1928 $page_paths = explode('/', $page_paths); 1929 foreach( $page_paths as $pathdir)1929 foreach( (array) $page_paths as $pathdir) 1930 1930 $full_path .= ($pathdir!=''?'/':'') . sanitize_title($pathdir); 1931 1931 … … 1988 1988 function &get_page_children($page_id, $pages) { 1989 1989 $page_list = array(); 1990 foreach ( $pages as $page ) {1990 foreach ( (array) $pages as $page ) { 1991 1991 if ( $page->post_parent == $page_id ) { 1992 1992 $page_list[] = $page; … … 2014 2014 function get_page_hierarchy($posts, $parent = 0) { 2015 2015 $result = array ( ); 2016 if ($posts) { foreach ( $posts as $post) {2016 if ($posts) { foreach ( (array) $posts as $post) { 2017 2017 if ($post->post_parent == $parent) { 2018 2018 $result[$post->ID] = $post->post_name; … … 3029 3029 } 3030 3030 3031 foreach ( array_keys($cache) as $post)3031 foreach ( (array) array_keys($cache) as $post) 3032 3032 wp_cache_set($post, $cache[$post], 'post_meta'); 3033 3033
Note: See TracChangeset
for help on using the changeset viewer.