[wp-trac] [WordPress Trac] #50961: Fix missing ref array in pre_get_users
WordPress Trac
noreply at wordpress.org
Fri Aug 14 22:40:15 UTC 2020
#50961: Fix missing ref array in pre_get_users
----------------------------------------+------------------------------
Reporter: andy | Owner: adamsilverstein
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 5.6
Component: Users | Version: trunk
Severity: normal | Resolution:
Keywords: needs-patch good-first-bug | Focuses:
----------------------------------------+------------------------------
Changes (by adamsilverstein):
* keywords: good-first-bug has-patch => needs-patch good-first-bug
Comment:
@andy I noticed we have [https://github.com/WordPress/wordpress-
develop/blob/30965710474260b25031951df31eec901e716e28/tests/phpunit/tests/user/query.php#L1291-L1302
tests for this] and also found extensive plugin use where the original
$this is modified.
I believe this works because PHP passes objects by reference, however
changing to `do_action_ref_array` would certainly be easier to read code-
wise. I'll give that change a test to make sure tests still work as
expected.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50961#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list