diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-05-07 10:38:47 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2015-05-07 10:38:47 +0300 |
commit | e96616739c2414947197a67fe8af6da594b34762 (patch) | |
tree | 56b9dc4c2e45f79b6173c6310e1cf2d58f6a117f /ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp | |
parent | dd0b602381fad375d8f29a97f25f099be7c9db35 (diff) | |
download | php-git-e96616739c2414947197a67fe8af6da594b34762.tar.gz |
Fixed redundand internal constructor behavior (they shouldn't return NULL anymore)
Diffstat (limited to 'ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp')
-rw-r--r-- | ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp index 4dee58df2e..8acf128b2c 100644 --- a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp +++ b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp @@ -42,7 +42,6 @@ static void _php_intlrbbi_constructor_body(INTERNAL_FUNCTION_PARAMETERS) &rules, &rules_len, &compiled) == FAILURE) { intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "rbbi_create_instance: bad arguments", 0); - Z_OBJ_P(return_value) = NULL; return; } @@ -72,7 +71,6 @@ static void _php_intlrbbi_constructor_body(INTERNAL_FUNCTION_PARAMETERS) intl_error_set_custom_msg(NULL, msg, 1); efree(msg); delete rbbi; - Z_OBJ_P(return_value) = NULL; return; } } else { // compiled @@ -81,13 +79,11 @@ static void _php_intlrbbi_constructor_body(INTERNAL_FUNCTION_PARAMETERS) if (U_FAILURE(status)) { intl_error_set(NULL, status, "rbbi_create_instance: unable to " "create instance from compiled rules", 0); - Z_OBJ_P(return_value) = NULL; return; } #else intl_error_set(NULL, U_UNSUPPORTED_ERROR, "rbbi_create_instance: " "compiled rules require ICU >= 4.8", 0); - Z_OBJ_P(return_value) = NULL; return; #endif } @@ -102,11 +98,6 @@ U_CFUNC PHP_METHOD(IntlRuleBasedBreakIterator, __construct) zend_replace_error_handling(EH_THROW, IntlException_ce_ptr, &error_handling); return_value = getThis(); _php_intlrbbi_constructor_body(INTERNAL_FUNCTION_PARAM_PASSTHRU); - if (Z_TYPE_P(return_value) == IS_OBJECT && Z_OBJ_P(return_value) == NULL) { - if (!EG(exception)) { - zend_throw_exception(IntlException_ce_ptr, "Constructor failed", 0); - } - } zend_restore_error_handling(&error_handling); } |