[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 14:04:13 UTC 2021


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

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


Comment:

 Reviewed [attachment:"39589_c.patch"].

 - I agree with @wpgurudev. The root cause is the variable is not defined
 with no attachments.
 - Initializing the `$post_ids` variable before the conditional overrides
 is a clean and understandable approach ✅
 - Tests pass (there are no unit tests for uploading)

 Marking the patch ready for `commit`.

 Removing `needs-docs` as this patch is a bug fix but is not changing
 functionality.

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


More information about the wp-trac mailing list