From 76a7d5006942b522a0a87b3676073202f6b30990 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 15 Nov 2010 18:06:57 +0000 Subject: [PATCH] Sanity cast. see #15192. git-svn-id: https://develop.svn.wordpress.org/trunk@16389 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/post.php | 1 + 1 file changed, 1 insertion(+) diff --git a/wp-includes/post.php b/wp-includes/post.php index 189eae1765..96f03ebb2f 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -5268,6 +5268,7 @@ function get_post_format_string( $slug ) { */ function set_post_thumbnail( $post, $thumbnail_id ) { $post = get_post( $post ); + $thumbnail_id = absint( $thumbnail_id ); if ( $post && $thumbnail_id && get_post( $thumbnail_id ) ) { $thumbnail_html = wp_get_attachment_image( $thumbnail_id, 'thumbnail' ); if ( ! empty( $thumbnail_html ) ) {