diff options
author | Danack <Danack@basereality.com> | 2015-03-15 13:59:48 +0000 |
---|---|---|
committer | Danack <Danack@basereality.com> | 2015-03-15 13:59:48 +0000 |
commit | 99dae96dc0041f856ae066b3f572495da609d28e (patch) | |
tree | fa5dbd0d839b4973359273103bd2cbfb90a9288e /ext/intl/collator/collator_create.c | |
parent | c57bde7c9e2f4ac3e93f096eaa93d4ab0133915d (diff) | |
download | php-git-99dae96dc0041f856ae066b3f572495da609d28e.tar.gz |
Converted intl extension to use IntlException in constructors.
Diffstat (limited to 'ext/intl/collator/collator_create.c')
-rw-r--r-- | ext/intl/collator/collator_create.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/intl/collator/collator_create.c b/ext/intl/collator/collator_create.c index b2058422c2..7631d76ff4 100644 --- a/ext/intl/collator/collator_create.c +++ b/ext/intl/collator/collator_create.c @@ -25,7 +25,7 @@ #include "intl_data.h" /* {{{ */ -static void collator_ctor(INTERNAL_FUNCTION_PARAMETERS) +static void collator_ctor(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_constructor) { const char* locale; size_t locale_len = 0; @@ -38,8 +38,8 @@ static void collator_ctor(INTERNAL_FUNCTION_PARAMETERS) if( zend_parse_parameters( ZEND_NUM_ARGS(), "s", &locale, &locale_len ) == FAILURE ) { - intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, - "collator_create: unable to parse input params", 0 ); + intl_error_set_ex( NULL, U_ILLEGAL_ARGUMENT_ERROR, + "collator_create: unable to parse input params", 0, is_constructor ); zval_dtor(return_value); RETURN_NULL(); } @@ -53,7 +53,7 @@ static void collator_ctor(INTERNAL_FUNCTION_PARAMETERS) /* Open ICU collator. */ co->ucoll = ucol_open( locale, COLLATOR_ERROR_CODE_P( co ) ); - INTL_CTOR_CHECK_STATUS(co, "collator_create: unable to open ICU collator"); + INTL_CTOR_CHECK_STATUS(co, "collator_create: unable to open ICU collator", is_constructor); } /* }}} */ @@ -63,7 +63,7 @@ static void collator_ctor(INTERNAL_FUNCTION_PARAMETERS) PHP_FUNCTION( collator_create ) { object_init_ex( return_value, Collator_ce_ptr ); - collator_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU); + collator_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); } /* }}} */ @@ -75,7 +75,7 @@ PHP_METHOD( Collator, __construct ) zval orig_this = *getThis(); return_value = getThis(); - collator_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU); + collator_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); if (Z_TYPE_P(return_value) == IS_OBJECT && Z_OBJ_P(return_value) == NULL) { zend_object_store_ctor_failed(Z_OBJ(orig_this)); |