Index: trunk/extensions/cldr/LanguageNames.body.php |
— | — | @@ -63,7 +63,7 @@ |
64 | 64 | |
65 | 65 | /* Load override for wrong or missing entries in cldr */ |
66 | 66 | $override = dirname(__FILE__) . '/' . self::getOverrideFileName( $code ); |
67 | | - if ( file_exists( $override ) ) { |
| 67 | + if ( Language::isValidBuiltInCode( $code ) && file_exists( $override ) ) { |
68 | 68 | $names = false; |
69 | 69 | require( $override ); |
70 | 70 | if ( is_array( $names ) ) { |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | } |
74 | 74 | |
75 | 75 | $filename = dirname(__FILE__) . '/' . self::getFileName( $code ); |
76 | | - if ( file_exists( $filename ) ) { |
| 76 | + if ( Language::isValidBuiltInCode( $code ) && file_exists( $filename ) ) { |
77 | 77 | $names = false; |
78 | 78 | require( $filename ); |
79 | 79 | if ( is_array( $names ) ) { |