Skip to content

Commit 4431276

Browse files
authored
Merge pull request #142 from saucal/fix/fatal-error-with-locale
Fix fatal when default_locale is empty
2 parents d032938 + 498d54e commit 4431276

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

includes/Generator/CustomerInfo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ protected static function get_country_locale_info( string $country_code = 'en_US
6161
*/
6262
protected static function get_faker( $country_code = 'en_US' ) {
6363
$locale_info = self::get_country_locale_info( $country_code );
64-
$default_locale = $locale_info['default_locale'] ?? 'en_US';
64+
$default_locale = ! empty( $locale_info['default_locale'] ) ? $locale_info['default_locale'] : 'en_US';
6565

6666
$faker = \Faker\Factory::create( $default_locale );
6767

0 commit comments

Comments
 (0)