Page MenuHomePhabricator

Undefined index: data-user-name in MinervaTemplate.php
Closed, ResolvedPublic

Description

Notice: Undefined index: data-user-name in /var/www/html/w/extensions/MobileFrontend/includes/skins/MinervaTemplate.php on line 200

Revision::getUser() can return 0 (e.g. the user doesn't have the right to see the username or the user is anonymous), which will be interpreted as false in php and we only add data-user-gender in:
https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/includes/skins/SkinMinerva.php#L641-L654

Event Timeline

Florian claimed this task.
Florian raised the priority of this task from to Needs Triage.
Florian updated the task description. (Show Details)
Florian added a project: Web-Team-Backlog.
Florian subscribed.

Change 213208 had a related patch set uploaded (by Florianschmidtwelzow):
Don't try to access a non-existing key in an array

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

Change 213208 merged by jenkins-bot:
Don't try to access a non-existing key in an array

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