Page MenuHomePhabricator

Special:UserRights crashes with undefined variable "user"
Closed, ResolvedPublic

Description

includes/specials/SpecialUserrights.php line 476 in core master 5e7beed references a variable named $user which does not exist, and as such crashes:

PHP Notice: Undefined variable: user in /opt/mediawiki/src/mediawiki-snapshot-20160117/includes/specials/SpecialUserrights.php on line 476
PHP Fatal error: Call to a member function getName() on null in /opt/mediawiki/src/mediawiki-snapshot-20160117/includes/specials/SpecialUserrights.php on line 476

Event Timeline

ch2500 created this task.Jan 18 2016, 11:03 AM
ch2500 raised the priority of this task from to Needs Triage.
ch2500 updated the task description. (Show Details)
ch2500 added a subscriber: ch2500.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptJan 18 2016, 11:03 AM

CC'ing @lfaraone as the author of that referenced change

lfaraone closed this task as Resolved.Jan 24 2016, 7:00 PM
lfaraone claimed this task.
lfaraone added subscribers: Pranavmk98, Florian.

The referenced change is not a change to SpecialUserrights.php. The change that added a reference to $user to that file is rMW99c4684f2cea (FYI @Pranavmk98 @Florian).

However, I did notice this bug, and fixed it in rMW24db3940.