Index: trunk/phase3/includes/StubObject.php |
— | — | @@ -100,7 +100,8 @@ |
101 | 101 | } |
102 | 102 | |
103 | 103 | # Validate $code |
104 | | - if( empty( $code ) || !preg_match( '/^[a-z]+(-[a-z]+)?$/', $code ) ) { |
| 104 | + if( empty( $code ) || !preg_match( '/^[a-z-]+$/', $code ) ) { |
| 105 | + wfDebug( "Invalid user language code\n" ); |
105 | 106 | $code = $wgContLanguageCode; |
106 | 107 | } |
107 | 108 | |