Make WordPress Core


Ignore:
Timestamp:
05/07/2014 03:37:45 AM (11 years ago)
Author:
wonderboymusic
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/revision.php

    r27699 r28334  
    191191
    192192            return $revision;
    193             break;
    194193        }
    195194    }
     
    255254        return new WP_Error( 'post_type', __( 'Cannot create a revision of a revision' ) );
    256255
    257     $post_id = $post['ID'];
    258256    $post = _wp_post_revision_fields( $post, $autosave );
    259257    $post = wp_slash($post); //since data is from db
Note: See TracChangeset for help on using the changeset viewer.