[wp-trac] [WordPress Trac] #53411: Incorrect isset check in media bulk actions
WordPress Trac
noreply at wordpress.org
Tue Jun 15 16:51:04 UTC 2021
#53411: Incorrect isset check in media bulk actions
------------------------------+----------------------------
Reporter: david.binda | Owner: davidbaumwald
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 5.8
Component: Media | Version: trunk
Severity: normal | Resolution: fixed
Keywords: has-patch commit | Focuses:
------------------------------+----------------------------
Changes (by davidbaumwald):
* owner: (none) => davidbaumwald
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"51161" 51161]:
{{{
#!CommitTicketReference repository="" revision="51161"
Media: Ensure `$post_ids` is evaluated properly when processing bulk
actions.
After [51111], the `$post_ids` variable is now initialized as an empty
array when processing a bulk action. As such, the original check using
`isset` on `$post_ids` will always evaluate to `true`. This change swaps
the `isset` checks for `empty` to check array length instead.
Props david.binda, hellofromTonya.
Fixes #53411.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53411#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list