Index: trunk/phase3/languages/Language.php |
— | — | @@ -3321,7 +3321,7 @@ |
3322 | 3322 | * @return false|string |
3323 | 3323 | */ |
3324 | 3324 | static function getFallbackFor( $code ) { |
3325 | | - if ( $code === 'en' ) { |
| 3325 | + if ( $code === 'en' || !Language::isValidBuiltInCode( $code ) ) { |
3326 | 3326 | return false; |
3327 | 3327 | } else { |
3328 | 3328 | $fallbacks = self::getFallbacksFor( $code ); |
— | — | @@ -3338,7 +3338,7 @@ |
3339 | 3339 | * @return array |
3340 | 3340 | */ |
3341 | 3341 | static function getFallbacksFor( $code ) { |
3342 | | - if ( $code === 'en' ) { |
| 3342 | + if ( $code === 'en' || !Language::isValidBuiltInCode( $code ) ) { |
3343 | 3343 | return array(); |
3344 | 3344 | } else { |
3345 | 3345 | $v = self::getLocalisationCache()->getItem( $code, 'fallback' ); |