diff options
author | Máté Kocsis <kocsismate@woohoolabs.com> | 2019-12-31 11:27:02 +0100 |
---|---|---|
committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2019-12-31 11:46:11 +0100 |
commit | 345703724c633fb8c1b34e1299bf3375f000c398 (patch) | |
tree | 18da0e12163e82ce16fbee726df1839439a1edfa /ext/intl/calendar | |
parent | d9ac1ca8de298baf10f7c713c0b37c6ea5d89cf4 (diff) | |
download | php-git-345703724c633fb8c1b34e1299bf3375f000c398.tar.gz |
Use RETURN_THROWS() during ZPP in most of the extensions
Except for some bigger ones: reflection, sodium, spl
Diffstat (limited to 'ext/intl/calendar')
-rw-r--r-- | ext/intl/calendar/calendar_methods.cpp | 10 | ||||
-rw-r--r-- | ext/intl/calendar/gregoriancalendar_methods.cpp | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/ext/intl/calendar/calendar_methods.cpp b/ext/intl/calendar/calendar_methods.cpp index 50b4f6982d..76a50e0a10 100644 --- a/ext/intl/calendar/calendar_methods.cpp +++ b/ext/intl/calendar/calendar_methods.cpp @@ -61,7 +61,7 @@ U_CFUNC PHP_FUNCTION(intlcal_create_instance) if (zend_parse_parameters(ZEND_NUM_ARGS(), "|zs!", &zv_timezone, &locale_str, &dummy) == FAILURE) { - return; + RETURN_THROWS(); } timeZone = timezone_process_timezone_argument(zv_timezone, NULL, @@ -150,7 +150,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_keyword_values_for_locale) if (zend_parse_parameters(ZEND_NUM_ARGS(), "ssb", &key, &key_len, &locale, &locale_len, &commonly_used) == FAILURE) { - return; + RETURN_THROWS(); } //does not work; see ICU bug 9194 @@ -184,7 +184,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_now) intl_error_reset(NULL); if (zend_parse_parameters_none() == FAILURE) { - return; + RETURN_THROWS(); } RETURN_DOUBLE((double)Calendar::getNow()); @@ -195,7 +195,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_available_locales) intl_error_reset(NULL); if (zend_parse_parameters_none() == FAILURE) { - return; + RETURN_THROWS(); } int32_t count; @@ -1049,7 +1049,7 @@ U_CFUNC PHP_FUNCTION(intlcal_from_date_time) if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|s!", &zv_arg, &locale_str, &locale_str_len) == FAILURE) { - return; + RETURN_THROWS(); } if (!(Z_TYPE_P(zv_arg) == IS_OBJECT && instanceof_function( diff --git a/ext/intl/calendar/gregoriancalendar_methods.cpp b/ext/intl/calendar/gregoriancalendar_methods.cpp index 4c022c9473..f258e2661a 100644 --- a/ext/intl/calendar/gregoriancalendar_methods.cpp +++ b/ext/intl/calendar/gregoriancalendar_methods.cpp @@ -75,13 +75,13 @@ static void _php_intlgregcal_constructor_body( if (variant <= 2) { if (zend_parse_parameters(MIN(ZEND_NUM_ARGS(), 2), "|z!s!", &tz_object, &locale, &locale_len) == FAILURE) { - return; + RETURN_THROWS(); } } if (variant > 2 && zend_parse_parameters(ZEND_NUM_ARGS(), "lll|lll", &largs[0], &largs[1], &largs[2], &largs[3], &largs[4], &largs[5]) == FAILURE) { - return; + RETURN_THROWS(); } // instantion of ICU object |