mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-30 18:45:07 +00:00
Fix PHP 8.1 compatibility issue in ForeignNotifications
Passing null to functions that expect a string is no longer allowed. Here in this code it can apparently only happen in test scenarios. That's why I use a very minimal workround that still calls the same code. The lookup will return an empty string and trigger the expected code path below. Bug: T311448 Change-Id: If04924a22b82ae29b8f9327668e8965d6d2a490d
This commit is contained in:
parent
ed49fb3203
commit
9ab1d92c9c
|
@ -243,7 +243,7 @@ class EchoForeignNotifications {
|
|||
// try to fetch site name for this specific wiki, or fallback to the
|
||||
// general project's sitename if there is no override
|
||||
$wikiName = $wgConf->get( 'wgSitename', $wikiId ) ?: $wgConf->get( 'wgSitename', $site );
|
||||
$langName = Language::fetchLanguageName( $langCode, $wgLang->getCode() );
|
||||
$langName = Language::fetchLanguageName( $langCode ?? '', $wgLang->getCode() );
|
||||
|
||||
if ( !$langName ) {
|
||||
// if we can't find a language name (in language-agnostic
|
||||
|
|
Loading…
Reference in a new issue