[wp-trac] [WordPress Trac] #7014: get_post_custom() doesn't always return an array

WordPress Trac wp-trac at lists.automattic.com
Wed May 21 11:24:46 GMT 2008


#7014: get_post_custom() doesn't always return an array
---------------------+------------------------------------------------------
 Reporter:  donncha  |       Owner:  anonymous
     Type:  defect   |      Status:  new      
 Priority:  normal   |   Milestone:  2.5.2    
Component:  General  |     Version:  2.5.1    
 Severity:  normal   |    Keywords:           
---------------------+------------------------------------------------------
 I have noticed that get_post_custom() doesn't always return an array. wp-
 includes/feed.php uses this function in a foreach loop at line 164 in WP
 2.5.1 resulting in an error message stating "Invalid argument supplied for
 foreach() in ...wp-includes/feed.php on line 164"

 I think update_postmeta_cache() in wp-includes/post.php should cast it's
 return value as an array possibly.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/7014>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list