8000 A constructor returning null is counter-intuitive. BTW, isn't this a … · DerekRoth/symfony@7837d32 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7837d32

Browse files
committed
A constructor returning null is counter-intuitive. BTW, isn't this a intl bug ?
1 parent a1d866e commit 7837d32

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Component/Locale/Locale.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class Locale extends \Locale
4141
static public function getDisplayCountries($locale)
4242
{
4343
if (!isset(self::$countries[$locale])) {
44-
$bundle = new \ResourceBundle($locale, __DIR__.'/Resources/data/region');
44+
$bundle = \ResourceBundle::create($locale, __DIR__.'/Resources/data/region');
4545

4646
if (null === $bundle) {
4747
throw new \RuntimeException('The country resource bundle could not be loaded');
@@ -88,7 +88,7 @@ static public function getCountries()
8888
static public function getDisplayLanguages($locale)
8989
{
9090
if (!isset(self::$languages[$locale])) {
91-
$bundle = new \ResourceBundle($locale, __DIR__.'/Resources/data/lang');
91+
$bundle = \ResourceBundle::create($locale, __DIR__.'/Resources/data/lang');
9292

9393
if (null === $bundle) {
9494
throw new \RuntimeException('The language resource bundle could not be loaded');
@@ -133,7 +133,7 @@ static public function getLanguages()
133133
static public function getDisplayLocales($locale)
134134
{
135135
if (!isset(self::$locales[$locale])) {
136-
$bundle = new \ResourceBundle($locale, __DIR__.'/Resources/data/names');
136+
$bundle = \ResourceBundle::create($locale, __DIR__.'/Resources/data/names');
137137

138138
if (null === $bundle) {
139139
throw new \RuntimeException('The locale resource bundle could not be loaded');

0 commit comments

Comments
 (0)
0