[wp-trac] [WordPress Trac] #39589: PHP Notice if nothing selected on custom bulk action in Media Library.

WordPress Trac noreply at wordpress.org
Thu Jun 3 13:09:29 UTC 2021


#39589: PHP Notice if nothing selected on custom bulk action in Media Library.
-------------------------------------------------+-------------------------
 Reporter:  gitlost                              |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Media                                |     Version:  4.7
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing needs-docs   |     Focuses:
  has-testing-info                               |
-------------------------------------------------+-------------------------
Changes (by hellofromTonya):

 * keywords:  has-patch needs-testing needs-docs => has-patch needs-testing
     needs-docs has-testing-info


Comment:

 == Steps to reproduce and test

 - Add a file to `wp-content/mu-plugins/` and copy paste the supplied `Foo`
 code:
 {{{#!php
 <?php

 add_filter( 'bulk_actions-upload', function( $actions ) {
         $actions['foo'] = 'Foo';
         return $actions;
 } );

 }}}

 - In `wp-config.php` add `define( 'WP_DEBUG', true );`
 - In the admin, go to `Media`
 - In `Bulk actions` dropdown, select `Foo`
 - Click `Apply` button
 - Check for the PHP Notice
     - Note, if you have `WP_DEBUG_LOG` set to `true`, the notice will
 appear in the `debug.log`.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/39589#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list