From f63b6cde3aa4447637d859040fd36847253604df Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Wed, 7 May 2014 03:37:45 +0000 Subject: [PATCH] In `wp-includes/revision.php` - remove dead code: * In `wp_get_post_autosave()`, `break` is unreachable after `return` * In `_wp_put_post_revision()`, `$post_id` is set then never used. See #27882. git-svn-id: https://develop.svn.wordpress.org/trunk@28334 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/revision.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/wp-includes/revision.php b/src/wp-includes/revision.php index 48523032e7..1203d78105 100644 --- a/src/wp-includes/revision.php +++ b/src/wp-includes/revision.php @@ -190,7 +190,6 @@ function wp_get_post_autosave( $post_id, $user_id = 0 ) { continue; return $revision; - break; } } @@ -254,7 +253,6 @@ function _wp_put_post_revision( $post = null, $autosave = false ) { if ( isset($post['post_type']) && 'revision' == $post['post_type'] ) return new WP_Error( 'post_type', __( 'Cannot create a revision of a revision' ) ); - $post_id = $post['ID']; $post = _wp_post_revision_fields( $post, $autosave ); $post = wp_slash($post); //since data is from db