From dde135b3343453e62fc2219c600b100ac8297405 Mon Sep 17 00:00:00 2001 From: Fomafix Date: Wed, 2 Oct 2024 11:19:58 +0000 Subject: [PATCH] Use ?? instead of default value in getRawVal() Bug: T376245 Change-Id: I15eeaf961dce3f1263a8253c5c93f455cf02e1e4 --- includes/Api/ApiULSSetLanguage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Api/ApiULSSetLanguage.php b/includes/Api/ApiULSSetLanguage.php index bf3e403e..603b2136 100644 --- a/includes/Api/ApiULSSetLanguage.php +++ b/includes/Api/ApiULSSetLanguage.php @@ -62,7 +62,7 @@ class ApiULSSetLanguage extends ApiBase { $this->dieWithError( [ 'apierror-mustbeposted', $request->getText( 'action' ) ] ); } - $languageCode = $request->getRawVal( 'languagecode', '' ); + $languageCode = $request->getRawVal( 'languagecode' ) ?? ''; if ( !$this->languageNameUtils->isSupportedLanguage( $languageCode ) ) { $this->dieWithError( [ 'apierror-invalidlang', $this->encodeParamName( 'languagecode' ) ]