summaryrefslogtreecommitdiff
path: root/ext/intl/locale/locale_methods.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/intl/locale/locale_methods.c')
-rw-r--r--ext/intl/locale/locale_methods.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c
index eaf113a97e..18a051fe20 100644
--- a/ext/intl/locale/locale_methods.c
+++ b/ext/intl/locale/locale_methods.c
@@ -405,6 +405,7 @@ static void get_icu_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAMETERS)
if(loc_name_len == 0) {
loc_name = intl_locale_get_default();
+ loc_name_len = strlen(loc_name);
}
INTL_CHECK_LOCALE_LEN(loc_name_len);
@@ -1169,6 +1170,7 @@ PHP_FUNCTION(locale_get_all_variants)
if(loc_name_len == 0) {
loc_name = intl_locale_get_default();
+ loc_name_len = strlen(loc_name);
}
INTL_CHECK_LOCALE_LEN(loc_name_len);
@@ -1274,6 +1276,7 @@ PHP_FUNCTION(locale_filter_matches)
if(loc_range_len == 0) {
loc_range = intl_locale_get_default();
+ loc_range_len = strlen(loc_range);
}
if( strcmp(loc_range,"*")==0){
@@ -1557,8 +1560,10 @@ PHP_FUNCTION(locale_lookup)
if(loc_range_len == 0) {
if(fallback_loc_str) {
loc_range = ZSTR_VAL(fallback_loc_str);
+ loc_range_len = ZSTR_LEN(fallback_loc_str);
} else {
loc_range = intl_locale_get_default();
+ loc_range_len = strlen(loc_range);
}
}