X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FWebRequest.php;h=2a03d2dc7d3158614dbbef8b0b437ab981b39da8;hb=f032d27d0cfc16d93d9164498c3967c77c60cfc8;hp=e5cdda65d4e2e36d9b6f43f70c3de7b4ae44ce31;hpb=b8e0ca16aa743581f5fac5cef8bed5ac2bf6e7cb;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/WebRequest.php b/includes/WebRequest.php index e5cdda65d4..2a03d2dc7d 100644 --- a/includes/WebRequest.php +++ b/includes/WebRequest.php @@ -382,17 +382,15 @@ class WebRequest { */ private function getGPCVal( $arr, $name, $default ) { # PHP is so nice to not touch input data, except sometimes: - # https://secure.php.net/variables.external#language.variables.external.dot-in-names + # https://www.php.net/variables.external#language.variables.external.dot-in-names # Work around PHP *feature* to avoid *bugs* elsewhere. $name = strtr( $name, '.', '_' ); if ( isset( $arr[$name] ) ) { $data = $arr[$name]; - if ( isset( $_GET[$name] ) && !is_array( $data ) ) { + if ( isset( $_GET[$name] ) && is_string( $data ) ) { # Check for alternate/legacy character encoding. $contLang = MediaWikiServices::getInstance()->getContentLanguage(); - if ( $contLang ) { - $data = $contLang->checkTitleEncoding( $data ); - } + $data = $contLang->checkTitleEncoding( $data ); } $data = $this->normalizeUnicode( $data ); return $data;