Make WordPress Core

Ticket #56170: typecast-postid-bulk-delete-attachments-1.diff

File typecast-postid-bulk-delete-attachments-1.diff, 473 bytes (added by eherman24, 22 months ago)

Updated diff.

  • src/wp-admin/upload.php

     
    194194                                        wp_die( __( 'Sorry, you are not allowed to delete this item.' ) );
    195195                                }
    196196
    197                                 if ( ! wp_delete_attachment( $post_id_del ) ) {
     197                                if ( ! wp_delete_attachment( (int) $post_id_del ) ) {
    198198                                        wp_die( __( 'Error in deleting the attachment.' ) );
    199199                                }
    200200                        }