WordPress.org

Make WordPress Core

Ticket #25107: 25107.patch

File 25107.patch, 573 bytes (added by c3mdigital, 5 years ago)

Return early if postmeta can't be deleted

  • wp-includes/post.php

     
    40534053        if ( !$force_delete && EMPTY_TRASH_DAYS && MEDIA_TRASH && 'trash' != $post->post_status )
    40544054                return wp_trash_post( $post_id );
    40554055
    4056         delete_post_meta($post_id, '_wp_trash_meta_status');
     4056        if ( ! delete_post_meta($post_id, '_wp_trash_meta_status') )
     4057                return false;
     4058
    40574059        delete_post_meta($post_id, '_wp_trash_meta_time');
    40584060
    40594061        $meta = wp_get_attachment_metadata( $post_id );