mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Do not fetch default locale once on minit or rinit
The default locale is now requested to ICU when it's needed by using intl_get_default_locale().
This commit is contained in:
parent
0dfcc3e798
commit
c052b9c99a
8 changed files with 15 additions and 24 deletions
|
@ -40,7 +40,7 @@ static void datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
|
|||
{
|
||||
zval *object;
|
||||
|
||||
char *locale_str;
|
||||
const char *locale_str;
|
||||
int locale_len = 0;
|
||||
Locale locale;
|
||||
long date_type = 0;
|
||||
|
@ -72,7 +72,7 @@ static void datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
|
|||
|
||||
INTL_CHECK_LOCALE_LEN_OBJ(locale_len, return_value);
|
||||
if (locale_len == 0) {
|
||||
locale_str = INTL_G(default_locale);
|
||||
locale_str = intl_locale_get_default(TSRMLS_C);
|
||||
}
|
||||
locale = Locale::createFromName(locale_str);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue