1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 06:51:18 +02:00

avoid strlen

(cherry picked from commit aaa5d07365)
This commit is contained in:
Anatol Belski
2016-10-12 13:28:23 +02:00
parent d25e427ab1
commit 0cf880e70c

View File

@@ -407,7 +407,7 @@ static void get_icu_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAMETERS)
loc_name = intl_locale_get_default();
}
INTL_CHECK_LOCALE_LEN(strlen(loc_name));
INTL_CHECK_LOCALE_LEN(loc_name_len);
/* Call ICU get */
tag_value = get_icu_value_internal( loc_name , tag_name , &result ,0);
@@ -1167,7 +1167,7 @@ PHP_FUNCTION(locale_get_all_variants)
loc_name = intl_locale_get_default();
}
INTL_CHECK_LOCALE_LEN(strlen(loc_name));
INTL_CHECK_LOCALE_LEN(loc_name_len);
array_init( return_value );
@@ -1276,8 +1276,8 @@ PHP_FUNCTION(locale_filter_matches)
RETURN_TRUE;
}
INTL_CHECK_LOCALE_LEN(strlen(loc_range));
INTL_CHECK_LOCALE_LEN(strlen(lang_tag));
INTL_CHECK_LOCALE_LEN(loc_range_len);
INTL_CHECK_LOCALE_LEN(lang_tag_len);
if( boolCanonical ){
/* canonicalize loc_range */
@@ -1560,7 +1560,7 @@ PHP_FUNCTION(locale_lookup)
hash_arr = Z_ARRVAL_P(arr);
INTL_CHECK_LOCALE_LEN(strlen(loc_range));
INTL_CHECK_LOCALE_LEN(loc_range_len);
if( !hash_arr || zend_hash_num_elements( hash_arr ) == 0 ) {
RETURN_EMPTY_STRING();