Make WordPress Core

Ticket #39589: 39589.patch

File 39589.patch, 713 bytes (added by achbed, 6 years ago)
  • wp-admin/upload.php

     
    167167                        break;
    168168                default:
    169169                        /** This action is documented in wp-admin/edit-comments.php */
    170                         $location = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $location, $doaction, $post_ids );
     170                        if ( ! isset( $post_ids ) ) {
     171                                $post_ids = array();
     172                        }
     173                        $new_location = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $location, $doaction, (array) $post_ids );
     174                        if ( ! empty( $new_location ) ) {
     175                                $location = $new_location;
     176                        }
    171177        }
    172178
    173179        wp_redirect( $location );