SpecialWithoutInterwiki: Don't pass null through to Title::capitalize()

Bug: T311570
Change-Id: I160426192354c0e94f14081ffe03e94c1fc9513c
This commit is contained in:
Reedy 2022-07-02 19:23:26 +01:00
parent fc9afe98c9
commit 237091d3e5

View file

@ -57,8 +57,8 @@ class SpecialWithoutInterwiki extends PageQueryPage {
}
public function execute( $par ) {
$this->prefix = Title::capitalize(
$this->getRequest()->getVal( 'prefix', $par ), NS_MAIN );
$prefix = $this->getRequest()->getVal( 'prefix', $par );
$this->prefix = $prefix !== null ? Title::capitalize( $prefix, NS_MAIN ) : '';
parent::execute( $par );
}