From 16a58e34a2760ed43ed48090ce4f6f2841cb9597 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 6 May 2014 21:38:23 +0000 Subject: [PATCH] In `get_pages()`, `$cache` does not need to be reset to an empty array. `update_post_cache( $pages )` takes care of priming. In `set_post_thumbnail()`, (accidental) assignment is unnecessary for `$thumbnail_html` as it is not used. See #27882. git-svn-id: https://develop.svn.wordpress.org/trunk@28332 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/post.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index d537148d29..85d0d16baf 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -4176,9 +4176,6 @@ function get_pages( $args = array() ) { return $pages; } - if ( !is_array($cache) ) - $cache = array(); - $inclusions = ''; if ( ! empty( $include ) ) { $child_of = 0; //ignore child_of, parent, exclude, meta_key, and meta_value params if using include @@ -5608,7 +5605,7 @@ function set_post_thumbnail( $post, $thumbnail_id ) { $post = get_post( $post ); $thumbnail_id = absint( $thumbnail_id ); if ( $post && $thumbnail_id && get_post( $thumbnail_id ) ) { - if ( $thumbnail_html = wp_get_attachment_image( $thumbnail_id, 'thumbnail' ) ) + if ( wp_get_attachment_image( $thumbnail_id, 'thumbnail' ) ) return update_post_meta( $post->ID, '_thumbnail_id', $thumbnail_id ); else return delete_post_meta( $post->ID, '_thumbnail_id' );