symfony/symfony — Issue #3486: Warning:  Invalid argument supplied for foreach() for ti locale
Author: umpirsky
Created: 2012-03-02 12:34:11+00:00
State: open

This code:

```php
use Symfony\Component\Locale\Locale;

$locale = new Locale();
foreach ($locale->getLocales() as $language) {
$locale->getDisplayCountries($language);
}
```

Gives:

```
PHP Warning: Invalid argument supplied for foreach() in vendor/Symfony/Component/Locale/Locale.php on line 55
PHP Stack trace:
PHP 1. {main}() build:0
PHP 2. Symfony\Component\Locale\Locale::getDisplayCountries() build:23
PHP Warning: Invalid argument supplied for foreach() in vendor/Symfony/Component/Locale/Locale.php on line 55
PHP Stack trace:
PHP 1. {main}() build:0
PHP 2. Symfony\Component\Locale\Locale::getDisplayCountries() build:23
```

And warning happens for locale `ti` and `ti_ER`.