8000 [Intl] Explicit check by ro0NL · Pull Request #33158 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Intl] Explicit check #33158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[Intl] Explicit check
  • Loading branch information
ro0NL committed Aug 14, 2019
commit fbd4ce4c5c74347fe7657473c3246cd6a68fe332
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ private function generateAlpha2ToAlpha3Mapping(ArrayAccessibleResourceBundle $me
$aliases = iterator_to_array($metadataBundle['alias']['language']);
$alpha2ToAlpha3 = [];

foreach ($aliases as $alias => $language) {
$language = $language['replacement'];
if (2 === \strlen($language) && 3 === \strlen($alias)) {
foreach ($aliases as $alias => $data) {
$language = $data['replacement'];
if (2 === \strlen($language) && 3 === \strlen($alias) && 'overlong' === $data['reason']) {
if (isset(self::$preferredAlpha2ToAlpha3Mapping[$language])) {
// Validate to prevent typos
if (!isset($aliases[self::$preferredAlpha2ToAlpha3Mapping[$language]])) {
Expand Down
0