[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 12:03:28 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:
------------------------------------------------+--------------------------

Comment (by wpgurudev):

 This issue is happening because `$post_ids` variable is never getting
 defined when no attachments are selected.

 We can define the variable as blank array just to ensure this issue would
 not occur and later modify it.

 Adding patch here.

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


More information about the wp-trac mailing list