WordPress.org

Make WordPress Core

Ticket #9199: 9199_revision.diff

File 9199_revision.diff, 840 bytes (added by hailin, 7 years ago)

patch

  • C:/xampp/htdocs/wordpress_trunk/wp-includes/post.php

     
    35073507                return new WP_Error( 'post_type', __( 'Cannot create a revision of a revision' ) ); 
    35083508 
    35093509        $post = _wp_post_revision_fields( $post, $autosave ); 
    3510  
     3510        $post = add_magic_quotes($post); //since data is from db 
     3511         
    35113512        $revision_id = wp_insert_post( $post ); 
    35123513        if ( is_wp_error($revision_id) ) 
    35133514                return $revision_id; 
     
    35833584                return false; 
    35843585 
    35853586        $update['ID'] = $revision['post_parent']; 
     3587         
     3588        $update = add_magic_quotes( $update ); //since data is from db 
    35863589 
    35873590        $post_id = wp_update_post( $update ); 
    35883591        if ( is_wp_error( $post_id ) )