dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c6c1b4b
)
Avoid fatal errors with uselang=s
author
Niklas Laxström
<niklas.laxstrom@gmail.com>
Wed, 3 Apr 2013 10:35:29 +0000
(10:35 +0000)
committer
Gerrit Code Review
<gerrit@wikimedia.org>
Fri, 5 Apr 2013 14:04:02 +0000
(14:04 +0000)
languages is not a subclass of Language
Force valid built-in language codes to be at least two letters long.
Bug: 46710
Change-Id: Ife8885ed4bdb3a017a54e063f5dc58468ba231d5
languages/Language.php
patch
|
blob
|
history
diff --git
a/languages/Language.php
b/languages/Language.php
index
57d456a
..
156f7b0
100644
(file)
--- a/
languages/Language.php
+++ b/
languages/Language.php
@@
-357,7
+357,7
@@
class Language {
throw new MWException( __METHOD__ . " must be passed a string, $type given$addmsg" );
}
- return (bool)preg_match( '/^[a-z0-9-]
+
$/i', $code );
+ return (bool)preg_match( '/^[a-z0-9-]
{2,}
$/i', $code );
}
/**