Page MenuHomePhabricator

SpecialUserrights: fetchUser() called with wrong parameters
Closed, ResolvedPublicPRODUCTION ERROR

Description

Spotted in production as of 1.29.0-wmf.4:

Warning: fetchUser() expects exactly 2 parameters, 1 given in /srv/mediawiki/php-1.29.0-wmf.4/includes/specials/SpecialUserrights.php on line 335

Event Timeline

Looks like the bad callers are ApiUserrights and ApiQueryUsers. The former should probably pass true as its $write parameter, the latter looks like it should pass false.

For ApiQueryUsers it doesn't really matter, it looks like the code path which checks this can't be reached (as it can't pass cross-wiki user names).

Change 324511 had a related patch set uploaded (by Bartosz Dziewoński):
SpecialUserrights: Make new fetchUser() parameter optional

https://gerrit.wikimedia.org/r/324511

Change 324516 had a related patch set uploaded (by Chad):
SpecialUserrights: Make new fetchUser() parameter optional

https://gerrit.wikimedia.org/r/324516

Change 324511 merged by jenkins-bot:
SpecialUserrights: Make new fetchUser() parameter optional

https://gerrit.wikimedia.org/r/324511

Change 324516 merged by jenkins-bot:
SpecialUserrights: Make new fetchUser() parameter optional

https://gerrit.wikimedia.org/r/324516

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:11 PM