diff options
author | Thiemo Kreuz <thiemo.kreuz@wikimedia.de> | 2019-03-11 09:40:36 +0100 |
---|---|---|
committer | Thiemo Kreuz <thiemo.kreuz@wikimedia.de> | 2019-03-11 09:50:52 +0100 |
commit | a2c1d8c0431ad111126f6cc22a51e7ecf2a45a1b (patch) | |
tree | 844145201ccbabd1f7ee88b08cd93e1dd2d705c6 /mw-config | |
parent | 278ac40e9609b0b226a85e020f5e574054e1d78f (diff) | |
download | mediawikicore-a2c1d8c0431ad111126f6cc22a51e7ecf2a45a1b.tar.gz mediawikicore-a2c1d8c0431ad111126f6cc22a51e7ecf2a45a1b.zip |
Use the WebRequest::getCheck() shortcut where possible
This is inspired by Ib117e05.
As far as I can tell this is functionally identical. Even arrays should
behave the same, as both the getVal() and getCheck() methods do have a
special case that returns the `null` default in case the user tried to
pass multiple values instead of a single scalar.
Change-Id: Id4e4ec91f39d3c39461bd41673bdafc3bde11737
Diffstat (limited to 'mw-config')
-rw-r--r-- | mw-config/index.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mw-config/index.php b/mw-config/index.php index df3f6e550072..b625c96002c9 100644 --- a/mw-config/index.php +++ b/mw-config/index.php @@ -63,7 +63,7 @@ function wfInstallerMain() { $session = array(); } - if ( $request->getVal( 'uselang' ) !== null ) { + if ( $request->getCheck( 'uselang' ) ) { $langCode = $request->getVal( 'uselang' ); } elseif ( isset( $session['settings']['_UserLang'] ) ) { $langCode = $session['settings']['_UserLang']; |