Make WordPress Core

Ticket #31199: 31199.patch

File 31199.patch, 663 bytes (added by Fab1en, 8 years ago)
  • src/wp-admin/includes/class-wp-posts-list-table.php

     
    208208                        $actions['edit'] = __( 'Edit' );
    209209                }
    210210
    211                 if ( current_user_can( $post_type_obj->cap->delete_posts ) ) {
     211                if ( isset( $post_type_obj->cap ) && isset( $post_type_obj->cap->delete_posts ) && current_user_can( $post_type_obj->cap->delete_posts ) ) {
    212212                        if ( $this->is_trash || ! EMPTY_TRASH_DAYS ) {
    213213                                $actions['delete'] = __( 'Delete Permanently' );
    214214                        } else {