WordPress.org

Make WordPress Core

Ticket #25107: 25107.diff

File 25107.diff, 539 bytes (added by nacin, 7 years ago)
  • src/wp-includes/post.php

     
    41634163                delete_metadata_by_mid( 'post', $mid );
    41644164
    41654165        do_action( 'delete_post', $post_id );
    4166         $wpdb->delete( $wpdb->posts, array( 'ID' => $post_id ) );
     4166        $result = $wpdb->delete( $wpdb->posts, array( 'ID' => $post_id ) );
     4167        if ( ! $result )
     4168                return false;
    41674169        do_action( 'deleted_post', $post_id );
    41684170
    41694171        $uploadpath = wp_upload_dir();