From 6b4b646d0322da3d458c6b2c26d3f7724f112b7e Mon Sep 17 00:00:00 2001 From: Derick Alangi Date: Thu, 21 Mar 2019 15:26:16 +0100 Subject: [PATCH] languages: Partial revert of I8287118cf8ec01326ead9 Fix bad value for parameter $s: must be a string production error. Bug: T218883 Change-Id: I550f6cbc7fa9d290001ae0f2454cd1a46e672e0c --- languages/Language.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- 2.20.1