Make WordPress Core

Ticket #31199: patch.diff

File patch.diff, 626 bytes (added by sgrant, 10 years ago)

Add isset check before referencing

  • 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->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 {