Index: trunk/phase3/languages/Language.php |
— | — | @@ -196,7 +196,7 @@ |
197 | 197 | * not it exists. |
198 | 198 | */ |
199 | 199 | public static function isValidCode( $code ) { |
200 | | - return (bool)preg_match( '/^[a-z-]+$/', $code ); |
| 200 | + return strcspn( $code, "/\\\000" ) === strlen( $code ); |
201 | 201 | } |
202 | 202 | |
203 | 203 | /** |