Skip to content

Commit 0d30c88

Browse files
committed
use correct locale check
1 parent 07667ca commit 0d30c88

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

ext/intl/collator/collator_create.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static void collator_ctor(INTERNAL_FUNCTION_PARAMETERS)
4444
RETURN_NULL();
4545
}
4646

47-
INTL_CHECK_LOCALE_LEN(locale_len);
47+
INTL_CHECK_LOCALE_LEN_OBJ(locale_len, return_value);
4848
co = (Collator_object *) zend_object_store_get_object( object TSRMLS_CC );
4949

5050
if(locale_len == 0) {

ext/intl/dateformat/dateformat.c

+1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ static void datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
9898
RETURN_NULL();
9999
}
100100

101+
INTL_CHECK_LOCALE_LEN_OBJ(locale_len, return_value);
101102
DATE_FORMAT_METHOD_FETCH_OBJECT;
102103
// Convert pattern (if specified) to UTF-16.
103104
if( pattern_str && pattern_str_len>0 ){

ext/intl/formatter/formatter_main.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static void numfmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
4545
RETURN_NULL();
4646
}
4747

48-
INTL_CHECK_LOCALE_LEN(locale_len);
48+
INTL_CHECK_LOCALE_LEN_OBJ(locale_len, return_value);
4949
object = return_value;
5050
FORMATTER_METHOD_FETCH_OBJECT;
5151

ext/intl/msgformat/msgformat.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static void msgfmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
4848
RETURN_NULL();
4949
}
5050

51-
INTL_CHECK_LOCALE_LEN(locale_len);
51+
INTL_CHECK_LOCALE_LEN_OBJ(locale_len, return_value);
5252
MSG_FORMAT_METHOD_FETCH_OBJECT;
5353

5454
// Convert pattern (if specified) to UTF-16.

0 commit comments

Comments
 (0)