summaryrefslogtreecommitdiff
path: root/includes/StubObject.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/StubObject.php')
-rw-r--r--includes/StubObject.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/StubObject.php b/includes/StubObject.php
index c8731fff..52fbeb24 100644
--- a/includes/StubObject.php
+++ b/includes/StubObject.php
@@ -152,7 +152,7 @@ class StubUserLang extends StubObject {
$code = strtolower( $code );
# Validate $code
- if( empty( $code ) || !preg_match( '/^[a-z-]+$/', $code ) || ( $code === 'qqq' ) ) {
+ if( empty( $code ) || !Language::isValidCode( $code ) || ( $code === 'qqq' ) ) {
wfDebug( "Invalid user language code\n" );
$code = $wgContLanguageCode;
}