From: Derick Alangi Date: Thu, 21 Mar 2019 14:26:16 +0000 (+0100) Subject: languages: Partial revert of I8287118cf8ec01326ead9 X-Git-Tag: 1.34.0-rc.0~2432^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=6b4b646d0322da3d458c6b2c26d3f7724f112b7e languages: Partial revert of I8287118cf8ec01326ead9 Fix bad value for parameter $s: must be a string production error. Bug: T218883 Change-Id: I550f6cbc7fa9d290001ae0f2454cd1a46e672e0c --- diff --git a/languages/Language.php b/languages/Language.php index aaaf2a206c..9eea7ab1b8 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -2838,11 +2838,14 @@ class Language { } /** + * TODO: $s is not always a string per T218883 * @param string $s * @return string */ function checkTitleEncoding( $s ) { - Assert::parameterType( 'string', $s, '$s' ); + if ( is_array( $s ) ) { + throw new MWException( 'Given array to checkTitleEncoding.' ); + } if ( StringUtils::isUtf8( $s ) ) { return $s; }