dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Relax Language::isValidCode() to avoid breaking uselang hacks
[lhc/web/wiklou.git]
/
languages
/
Language.php
diff --git
a/languages/Language.php
b/languages/Language.php
index
edd607b
..
3b87db7
100644
(file)
--- a/
languages/Language.php
+++ b/
languages/Language.php
@@
-196,7
+196,7
@@
class Language {
* not it exists.
*/
public static function isValidCode( $code ) {
- return
(bool)preg_match( '/^[a-z-]+$/',
$code );
+ return
strcspn( $code, "/\\\000" ) === strlen(
$code );
}
/**