HomePhabricator

Log warning and show error on empty username

Description

Log warning and show error on empty username

Historically it seems that if Linker::userLink or friends were passed an
empty username (probably due to an incorrect database entry), they would
produce bogus output, e.g., an <a> with no contents or a link to the
invalid page "User_talk:" or similar.

In b6e1e99bec8d we replaced an occurrence of Title::makeTitle() (no
safety checks!) with creating a TitleValue, which asserts in its
constructor that the title text is not empty. This made such pages fail
an assertion and stop displaying at all.

Now there's a proper check for the error. Such cases will log a
production error and return "(no username available)".

Bug: T222529
Change-Id: Id65bdf9666b0d16e5553b8f38c7cf8fce2e37a25

Details

Provenance
SimetricalAuthored on May 6 2019, 8:58 AM
BPirkleCommitted on May 6 2019, 7:44 PM
Parents
rMWc3d8fa1fc3c7: Merge "Update LinkCache to use NamespaceInfo"
Branches
Unknown
Tags
Unknown
ChangeId
Id65bdf9666b0d16e5553b8f38c7cf8fce2e37a25