Follow up r60599. Make normalizeUnicode() work even if $wgContLang is still not set,
authorPlatonides <platonides@users.mediawiki.org>
Sat, 4 Jun 2011 21:19:07 +0000 (21:19 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Sat, 4 Jun 2011 21:19:07 +0000 (21:19 +0000)
just as it did before (eg. getGPCVal() check). This allows for early calls before
MediaWiki is completely initialised.

includes/WebRequest.php

index 9ede547..53881ef 100644 (file)
@@ -227,7 +227,7 @@ class WebRequest {
                        }
                } else {
                        global $wgContLang;
-                       $data = $wgContLang->normalize( $data );
+                       $data = isset( $wgContLang ) ? $wgContLang->normalize( $data ) : UtfNormal::cleanUp( $data );
                }
                return $data;
        }