From: Stanislav Malyshev Date: Tue, 22 Jul 2008 20:40:01 +0000 (+0000) Subject: use correct locale check X-Git-Tag: php-5.3.0alpha1~206 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0d30c88ded9883e801ef7e83ed78eae4f1eb20db;p=php use correct locale check --- diff --git a/ext/intl/collator/collator_create.c b/ext/intl/collator/collator_create.c index 404887b383..d42b7bcafd 100755 --- a/ext/intl/collator/collator_create.c +++ b/ext/intl/collator/collator_create.c @@ -44,7 +44,7 @@ static void collator_ctor(INTERNAL_FUNCTION_PARAMETERS) RETURN_NULL(); } - INTL_CHECK_LOCALE_LEN(locale_len); + INTL_CHECK_LOCALE_LEN_OBJ(locale_len, return_value); co = (Collator_object *) zend_object_store_get_object( object TSRMLS_CC ); if(locale_len == 0) { diff --git a/ext/intl/dateformat/dateformat.c b/ext/intl/dateformat/dateformat.c index 055066a1b9..e4b71e08bf 100755 --- a/ext/intl/dateformat/dateformat.c +++ b/ext/intl/dateformat/dateformat.c @@ -98,6 +98,7 @@ static void datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS) RETURN_NULL(); } + INTL_CHECK_LOCALE_LEN_OBJ(locale_len, return_value); DATE_FORMAT_METHOD_FETCH_OBJECT; // Convert pattern (if specified) to UTF-16. if( pattern_str && pattern_str_len>0 ){ diff --git a/ext/intl/formatter/formatter_main.c b/ext/intl/formatter/formatter_main.c index 85ea9d3157..d21534b9d8 100755 --- a/ext/intl/formatter/formatter_main.c +++ b/ext/intl/formatter/formatter_main.c @@ -45,7 +45,7 @@ static void numfmt_ctor(INTERNAL_FUNCTION_PARAMETERS) RETURN_NULL(); } - INTL_CHECK_LOCALE_LEN(locale_len); + INTL_CHECK_LOCALE_LEN_OBJ(locale_len, return_value); object = return_value; FORMATTER_METHOD_FETCH_OBJECT; diff --git a/ext/intl/msgformat/msgformat.c b/ext/intl/msgformat/msgformat.c index 679beb81ad..ba8cef78a7 100755 --- a/ext/intl/msgformat/msgformat.c +++ b/ext/intl/msgformat/msgformat.c @@ -48,7 +48,7 @@ static void msgfmt_ctor(INTERNAL_FUNCTION_PARAMETERS) RETURN_NULL(); } - INTL_CHECK_LOCALE_LEN(locale_len); + INTL_CHECK_LOCALE_LEN_OBJ(locale_len, return_value); MSG_FORMAT_METHOD_FETCH_OBJECT; // Convert pattern (if specified) to UTF-16.