[wp-trac] [WordPress Trac] #58789: Not countable. row_actions @ /wp-admin/includes/class-wp-list-table.php
WordPress Trac
noreply at wordpress.org
Sun Nov 30 11:07:37 UTC 2025
#58789: Not countable. row_actions @ /wp-admin/includes/class-wp-list-table.php
----------------------------------------------------+----------------------
Reporter: Nate1 | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Administration | Version: 6.2
Severity: major | Resolution: wontfix
Keywords: has-patch has-unit-tests needs-testing | Focuses:
----------------------------------------------------+----------------------
Changes (by tyxla):
* status: new => closed
* resolution: => wontfix
* milestone: Awaiting Review =>
Comment:
This is a classic example of over-defensive programming.
The first argument of the `user_row_actions` filter is documented to
accept only arrays of strings, so anything else we pass is invalid. See
https://developer.wordpress.org/reference/hooks/user_row_actions/
There are a bunch of other instances in WordPress that we can
intentionally break by passing a different type, for example:
https://github.com/WordPress/wordpress-
develop/blob/0d33b5cac36a5b83bb6cf8fed0d88d820b22c39d/src/wp-includes
/class-wp-query.php#L4955-L4957
From my perspective, triggering an error in that instance is reasonable
because otherwise, we might actually be concealing a potential type error.
I'm going to close this as "wontfix".
Thank you for your work on it, everyone!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58789#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list