Linker: Fix fatal error for "/* */" in an edit summary
authorTimo Tijhof <krinklemail@gmail.com>
Sun, 19 May 2019 11:17:23 +0000 (13:17 +0200)
committerKrinkle <krinklemail@gmail.com>
Sun, 19 May 2019 11:20:34 +0000 (11:20 +0000)
commit63cf83e089a962cec3603fac209b33679430e075
treee05726da43251ca42975514491bebd87288bac94
parentfefedf568bd39ccda63846e304ea93f2dd707099
Linker: Fix fatal error for "/*  */" in an edit summary

Follows-up b6e1e99bec8, which switched the method from Title::makeTitleSafe
to TitleValue. The latter throws fatal on non-string $fragment.

Title::makeTitleSafe, on the other hand, uses makeName(), which casts
$fragment to a string, and ignores if it ends up as empty string
(boolean false becomes empty string and thus did "the right thing").

Bug: T222857
Change-Id: Iecc2140fabd31ef0f193740c7fab0fc698c38e51
includes/Linker.php
tests/phpunit/includes/LinkerTest.php