WordPress.org

Make WordPress Core

Changeset 18876


Ignore:
Timestamp:
10/04/11 16:00:36 (4 years ago)
Author:
ryan
Message:

Avoid notice when performing bulk actions with now rows selected. Props SergeyBiryukov. fixes #18774

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/upload.php

    r18867 r18876  
    9191            break; 
    9292        case 'trash': 
     93            if ( !isset( $post_ids ) ) 
     94                break; 
    9395            foreach ( (array) $post_ids as $post_id ) { 
    9496                if ( !current_user_can( 'delete_post', $post_id ) ) 
     
    101103            break; 
    102104        case 'untrash': 
     105            if ( !isset( $post_ids ) ) 
     106                break; 
    103107            foreach ( (array) $post_ids as $post_id ) { 
    104108                if ( !current_user_can( 'delete_post', $post_id ) ) 
     
    111115            break; 
    112116        case 'delete': 
     117            if ( !isset( $post_ids ) ) 
     118                break; 
    113119            foreach ( (array) $post_ids as $post_id_del ) { 
    114120                if ( !current_user_can( 'delete_post', $post_id_del ) ) 
Note: See TracChangeset for help on using the changeset viewer.