mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Interwiki
synced 2024-11-23 22:13:37 +00:00
Fix Phan error related to message parameters
Caused by type hints added in MediaWiki core in I3e0df790ff9db2fa630f82408a7254a359fe61ca. `->getVal( 'prefix', '' )` and `->getVal( 'prefix' ) ?? ''` are equivalent, but Phan can't detect that the former is non-null. Change-Id: Iab478ec65fcd91eac7b7cc9d3b04b011ec46a0cb
This commit is contained in:
parent
68c828e813
commit
5505116a02
|
@ -244,7 +244,7 @@ class SpecialInterwiki extends SpecialPage {
|
|||
$status = Status::newGood();
|
||||
$request = $this->getRequest();
|
||||
$config = $this->getConfig();
|
||||
$prefix = $this->getRequest()->getVal( 'prefix', '' );
|
||||
$prefix = $this->getRequest()->getVal( 'prefix' ) ?? '';
|
||||
$do = $request->getVal( 'action' );
|
||||
// Show an error if the prefix is invalid (only when adding one).
|
||||
// Invalid characters for a title should also be invalid for a prefix.
|
||||
|
@ -356,7 +356,6 @@ class SpecialInterwiki extends SpecialPage {
|
|||
[ $prefix, $theurl, $trans, $local ],
|
||||
$this->getUser()
|
||||
);
|
||||
// @phan-suppress-next-line PhanTypeMismatchArgumentNullable
|
||||
$lookup->invalidateCache( $prefix );
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue