[wp-trac] [WordPress Trac] #26321: Warning message for update_post_thumbnail_cache()
WordPress Trac
noreply at wordpress.org
Fri Nov 29 16:13:09 UTC 2013
#26321: Warning message for update_post_thumbnail_cache()
--------------------------+-----------------------------
Reporter: klihelp | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Cache | Version: trunk
Severity: normal | Keywords:
--------------------------+-----------------------------
I got a warning/error related to update_post_thumbnail_cache() function:
> Warning: Invalid argument supplied for foreach() in ./wp-includes/post-
thumbnail-template.php on line 64
The $wp_query->posts array is missing, but we have the single
$wp_query->post.
{{{
foreach ( $wp_query->posts as $post ) {
if ( $id = get_post_thumbnail_id( $post->ID ) )
$thumb_ids[] = $id;
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/26321>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list