mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Cleanup return values for Intl when parameter parsing is unsuccessful
Closes GH-4871.
This commit is contained in:
parent
5cbe5a538c
commit
969e7a3c8b
35 changed files with 251 additions and 214 deletions
|
@ -53,7 +53,7 @@ static void _breakiter_factory(const char *func_name,
|
|||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s!",
|
||||
&locale_str, &dummy) == FAILURE) {
|
||||
RETURN_NULL();
|
||||
return;
|
||||
}
|
||||
|
||||
if (locale_str == NULL) {
|
||||
|
@ -113,7 +113,7 @@ U_CFUNC PHP_FUNCTION(breakiter_create_code_point_instance)
|
|||
intl_error_reset(NULL);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_NULL();
|
||||
return;
|
||||
}
|
||||
|
||||
CodePointBreakIterator *cpbi = new CodePointBreakIterator();
|
||||
|
@ -126,7 +126,7 @@ U_CFUNC PHP_FUNCTION(breakiter_get_text)
|
|||
object = ZEND_THIS;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
BREAKITER_METHOD_FETCH_OBJECT;
|
||||
|
@ -146,7 +146,7 @@ U_CFUNC PHP_FUNCTION(breakiter_set_text)
|
|||
object = ZEND_THIS;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &text) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
BREAKITER_METHOD_FETCH_OBJECT;
|
||||
|
@ -178,7 +178,7 @@ static void _breakiter_no_args_ret_int32(
|
|||
object = ZEND_THIS;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
BREAKITER_METHOD_FETCH_OBJECT;
|
||||
|
@ -199,7 +199,7 @@ static void _breakiter_int32_ret_int32(
|
|||
object = ZEND_THIS;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &arg) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
BREAKITER_METHOD_FETCH_OBJECT;
|
||||
|
@ -273,7 +273,7 @@ U_CFUNC PHP_FUNCTION(breakiter_current)
|
|||
object = ZEND_THIS;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
BREAKITER_METHOD_FETCH_OBJECT;
|
||||
|
@ -305,7 +305,7 @@ U_CFUNC PHP_FUNCTION(breakiter_is_boundary)
|
|||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l",
|
||||
&offset) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (offset < INT32_MIN || offset > INT32_MAX) {
|
||||
|
@ -329,7 +329,7 @@ U_CFUNC PHP_FUNCTION(breakiter_get_locale)
|
|||
object = ZEND_THIS;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &locale_type) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (locale_type != ULOC_ACTUAL_LOCALE && locale_type != ULOC_VALID_LOCALE) {
|
||||
|
@ -355,7 +355,7 @@ U_CFUNC PHP_FUNCTION(breakiter_get_parts_iterator)
|
|||
object = ZEND_THIS;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &key_type) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (key_type != PARTS_ITERATOR_KEY_SEQUENTIAL
|
||||
|
@ -378,7 +378,7 @@ U_CFUNC PHP_FUNCTION(breakiter_get_error_code)
|
|||
object = ZEND_THIS;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object (without resetting its last error code ). */
|
||||
|
@ -396,7 +396,7 @@ U_CFUNC PHP_FUNCTION(breakiter_get_error_message)
|
|||
object = ZEND_THIS;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ U_CFUNC PHP_FUNCTION(cpbi_get_last_code_point)
|
|||
object = ZEND_THIS;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
BREAKITER_METHOD_FETCH_OBJECT;
|
||||
|
|
|
@ -101,7 +101,7 @@ U_CFUNC PHP_FUNCTION(rbbi_get_rules)
|
|||
object = ZEND_THIS;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
BREAKITER_METHOD_FETCH_OBJECT;
|
||||
|
@ -126,7 +126,7 @@ U_CFUNC PHP_FUNCTION(rbbi_get_rule_status)
|
|||
object = ZEND_THIS;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
BREAKITER_METHOD_FETCH_OBJECT;
|
||||
|
@ -140,7 +140,7 @@ U_CFUNC PHP_FUNCTION(rbbi_get_rule_status_vec)
|
|||
object = ZEND_THIS;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
BREAKITER_METHOD_FETCH_OBJECT;
|
||||
|
@ -178,7 +178,7 @@ U_CFUNC PHP_FUNCTION(rbbi_get_binary_rules)
|
|||
object = ZEND_THIS;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
BREAKITER_METHOD_FETCH_OBJECT;
|
||||
|
|
|
@ -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_NULL();
|
||||
return;
|
||||
}
|
||||
|
||||
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_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
//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_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
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_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
int32_t count;
|
||||
|
@ -218,7 +218,7 @@ static void _php_intlcal_field_uec_ret_in32t_method(
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"Ol", &object, Calendar_ce_ptr, &field) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (field < 0 || field >= UCAL_FIELD_COUNT) {
|
||||
|
@ -249,7 +249,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_time)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, Calendar_ce_ptr) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
CALENDAR_METHOD_FETCH_OBJECT;
|
||||
|
@ -268,7 +268,7 @@ U_CFUNC PHP_FUNCTION(intlcal_set_time)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Od",
|
||||
&object, Calendar_ce_ptr, &time_arg) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
CALENDAR_METHOD_FETCH_OBJECT;
|
||||
|
@ -287,7 +287,7 @@ U_CFUNC PHP_FUNCTION(intlcal_add)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"Oll", &object, Calendar_ce_ptr, &field, &amount) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (field < 0 || field >= UCAL_FIELD_COUNT) {
|
||||
|
@ -317,7 +317,7 @@ U_CFUNC PHP_FUNCTION(intlcal_set_time_zone)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"Oz!", &object, Calendar_ce_ptr, &zv_timezone) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
CALENDAR_METHOD_FETCH_OBJECT;
|
||||
|
@ -349,7 +349,7 @@ static void _php_intlcal_before_after(
|
|||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"OO", &object, Calendar_ce_ptr, &when_object, Calendar_ce_ptr)
|
||||
== FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
CALENDAR_METHOD_FETCH_OBJECT;
|
||||
|
@ -407,7 +407,7 @@ U_CFUNC PHP_FUNCTION(intlcal_set)
|
|||
zend_parse_method_parameters(ZEND_NUM_ARGS(), object,
|
||||
"Oll|llll", &object, Calendar_ce_ptr, &arg1, &arg2, &arg3, &arg4,
|
||||
&arg5, &arg6) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < variant; i++) {
|
||||
|
@ -464,12 +464,12 @@ U_CFUNC PHP_FUNCTION(intlcal_roll)
|
|||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), object,
|
||||
"Olb", &object, Calendar_ce_ptr, &field, &bool_variant_val)
|
||||
== FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
bool_variant_val = Z_TYPE(args[1]) == IS_TRUE? 1 : 0;
|
||||
} else if (zend_parse_method_parameters(ZEND_NUM_ARGS(), object,
|
||||
"Oll", &object, Calendar_ce_ptr, &field, &value) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (field < 0 || field >= UCAL_FIELD_COUNT) {
|
||||
|
@ -506,7 +506,7 @@ U_CFUNC PHP_FUNCTION(intlcal_clear)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(),
|
||||
getThis(), "O|l!", &object, Calendar_ce_ptr, &field, &field_is_null) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
CALENDAR_METHOD_FETCH_OBJECT;
|
||||
|
@ -534,7 +534,7 @@ U_CFUNC PHP_FUNCTION(intlcal_field_difference)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"Odl", &object, Calendar_ce_ptr, &when, &field) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (field < 0 || field >= UCAL_FIELD_COUNT) {
|
||||
|
@ -572,7 +572,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_day_of_week_type)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"Ol", &object, Calendar_ce_ptr, &dow) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (dow < UCAL_SUNDAY || dow > UCAL_SATURDAY) {
|
||||
|
@ -597,7 +597,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_first_day_of_week)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"O", &object, Calendar_ce_ptr) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
CALENDAR_METHOD_FETCH_OBJECT;
|
||||
|
@ -620,7 +620,7 @@ static void _php_intlcal_field_ret_in32t_method(
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"Ol", &object, Calendar_ce_ptr, &field) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (field < 0 || field >= UCAL_FIELD_COUNT) {
|
||||
|
@ -657,7 +657,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_locale)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"Ol", &object, Calendar_ce_ptr, &locale_type) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (locale_type != ULOC_ACTUAL_LOCALE && locale_type != ULOC_VALID_LOCALE) {
|
||||
|
@ -688,7 +688,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_minimal_days_in_first_week)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"O", &object, Calendar_ce_ptr) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
CALENDAR_METHOD_FETCH_OBJECT;
|
||||
|
@ -712,7 +712,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_time_zone)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"O", &object, Calendar_ce_ptr) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
CALENDAR_METHOD_FETCH_OBJECT;
|
||||
|
@ -733,7 +733,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_type)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"O", &object, Calendar_ce_ptr) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
CALENDAR_METHOD_FETCH_OBJECT;
|
||||
|
@ -748,7 +748,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_weekend_transition)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"Ol", &object, Calendar_ce_ptr, &dow) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (dow < UCAL_SUNDAY || dow > UCAL_SATURDAY) {
|
||||
|
@ -773,7 +773,7 @@ U_CFUNC PHP_FUNCTION(intlcal_in_daylight_time)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"O", &object, Calendar_ce_ptr) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
CALENDAR_METHOD_FETCH_OBJECT;
|
||||
|
@ -794,7 +794,7 @@ U_CFUNC PHP_FUNCTION(intlcal_is_equivalent_to)
|
|||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"OO", &object, Calendar_ce_ptr, &other_object, Calendar_ce_ptr)
|
||||
== FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
other_co = Z_INTL_CALENDAR_P(other_object);
|
||||
|
@ -815,7 +815,7 @@ U_CFUNC PHP_FUNCTION(intlcal_is_lenient)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"O", &object, Calendar_ce_ptr) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
CALENDAR_METHOD_FETCH_OBJECT;
|
||||
|
@ -830,7 +830,7 @@ U_CFUNC PHP_FUNCTION(intlcal_is_set)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"Ol", &object, Calendar_ce_ptr, &field) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (field < 0 || field >= UCAL_FIELD_COUNT) {
|
||||
|
@ -852,7 +852,7 @@ U_CFUNC PHP_FUNCTION(intlcal_is_weekend)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"O|d!", &object, Calendar_ce_ptr, &date, &date_is_null) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
CALENDAR_METHOD_FETCH_OBJECT;
|
||||
|
@ -875,7 +875,7 @@ U_CFUNC PHP_FUNCTION(intlcal_set_first_day_of_week)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"Ol", &object, Calendar_ce_ptr, &dow) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (dow < UCAL_SUNDAY || dow > UCAL_SATURDAY) {
|
||||
|
@ -898,7 +898,7 @@ U_CFUNC PHP_FUNCTION(intlcal_set_lenient)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"Ob", &object, Calendar_ce_ptr, &is_lenient) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
CALENDAR_METHOD_FETCH_OBJECT;
|
||||
|
@ -915,7 +915,7 @@ U_CFUNC PHP_FUNCTION(intlcal_set_minimal_days_in_first_week)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"Ol", &object, Calendar_ce_ptr, &num_days) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (num_days < 1 || num_days > 7) {
|
||||
|
@ -941,7 +941,7 @@ U_CFUNC PHP_FUNCTION(intlcal_equals)
|
|||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"OO", &object, Calendar_ce_ptr, &other_object, Calendar_ce_ptr)
|
||||
== FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
CALENDAR_METHOD_FETCH_OBJECT;
|
||||
|
@ -964,7 +964,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_repeated_wall_time_option)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"O", &object, Calendar_ce_ptr) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
CALENDAR_METHOD_FETCH_OBJECT;
|
||||
|
@ -978,7 +978,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_skipped_wall_time_option)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"O", &object, Calendar_ce_ptr) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
CALENDAR_METHOD_FETCH_OBJECT;
|
||||
|
@ -993,7 +993,7 @@ U_CFUNC PHP_FUNCTION(intlcal_set_repeated_wall_time_option)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"Ol", &object, Calendar_ce_ptr, &option) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (option != UCAL_WALLTIME_FIRST && option != UCAL_WALLTIME_LAST) {
|
||||
|
@ -1016,7 +1016,7 @@ U_CFUNC PHP_FUNCTION(intlcal_set_skipped_wall_time_option)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"Ol", &object, Calendar_ce_ptr, &option) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (option != UCAL_WALLTIME_FIRST && option != UCAL_WALLTIME_LAST
|
||||
|
@ -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_NULL();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(Z_TYPE_P(zv_arg) == IS_OBJECT && instanceof_function(
|
||||
|
@ -1128,7 +1128,7 @@ U_CFUNC PHP_FUNCTION(intlcal_to_date_time)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, Calendar_ce_ptr) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
CALENDAR_METHOD_FETCH_OBJECT;
|
||||
|
@ -1206,7 +1206,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_error_code)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, Calendar_ce_ptr) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object (without resetting its last error code ). */
|
||||
|
@ -1224,7 +1224,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_error_message)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, Calendar_ce_ptr) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -207,7 +207,7 @@ U_CFUNC PHP_FUNCTION(intlgregcal_set_gregorian_change)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"Od", &object, GregorianCalendar_ce_ptr, &date) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
CALENDAR_METHOD_FETCH_OBJECT;
|
||||
|
@ -225,7 +225,7 @@ U_CFUNC PHP_FUNCTION(intlgregcal_get_gregorian_change)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"O", &object, GregorianCalendar_ce_ptr) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
CALENDAR_METHOD_FETCH_OBJECT;
|
||||
|
@ -240,7 +240,7 @@ U_CFUNC PHP_FUNCTION(intlgregcal_is_leap_year)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"Ol", &object, GregorianCalendar_ce_ptr, &year) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (year < INT32_MIN || year > INT32_MAX) {
|
||||
|
|
|
@ -39,7 +39,7 @@ PHP_FUNCTION( collator_get_attribute )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Ol",
|
||||
&object, Collator_ce_ptr, &attribute ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
@ -67,7 +67,7 @@ PHP_FUNCTION( collator_set_attribute )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Oll",
|
||||
&object, Collator_ce_ptr, &attribute, &value ) == FAILURE)
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
@ -94,7 +94,7 @@ PHP_FUNCTION( collator_get_strength )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, Collator_ce_ptr ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
@ -120,7 +120,7 @@ PHP_FUNCTION( collator_set_strength )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Ol",
|
||||
&object, Collator_ce_ptr, &strength ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
|
|
@ -47,7 +47,7 @@ PHP_FUNCTION( collator_compare )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Oss",
|
||||
&object, Collator_ce_ptr, &str1, &str1_len, &str2, &str2_len ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
|
|
@ -34,7 +34,7 @@ PHP_FUNCTION( collator_get_error_code )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, Collator_ce_ptr ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object (without resetting its last error code). */
|
||||
|
@ -62,7 +62,7 @@ PHP_FUNCTION( collator_get_error_message )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, Collator_ce_ptr ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object (without resetting its last error code). */
|
||||
|
|
|
@ -40,7 +40,7 @@ PHP_FUNCTION( collator_get_locale )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Ol",
|
||||
&object, Collator_ce_ptr, &type ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
|
|
@ -301,7 +301,7 @@ static void collator_sort_internal( int renumber, INTERNAL_FUNCTION_PARAMETERS )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Oa/|l",
|
||||
&object, Collator_ce_ptr, &array, &sort_flags ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
@ -392,7 +392,7 @@ PHP_FUNCTION( collator_sort_with_sort_keys )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Oa",
|
||||
&object, Collator_ce_ptr, &array ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
@ -555,7 +555,7 @@ PHP_FUNCTION( collator_get_sort_key )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Os",
|
||||
&object, Collator_ce_ptr, &str, &str_len ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
|
|
@ -52,7 +52,7 @@ PHP_FUNCTION( intl_is_failure )
|
|||
if( zend_parse_parameters( ZEND_NUM_ARGS(), "l",
|
||||
&err_code ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_BOOL( U_FAILURE( err_code ) );
|
||||
|
@ -71,7 +71,7 @@ PHP_FUNCTION( intl_error_name )
|
|||
if( zend_parse_parameters( ZEND_NUM_ARGS(), "l",
|
||||
&err_code ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_STRING( (char*)u_errorName( err_code ) );
|
||||
|
|
|
@ -427,7 +427,7 @@ static void php_converter_do_set_encoding(UConverter **pcnv, INTERNAL_FUNCTION_P
|
|||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &enc, &enc_len) == FAILURE) {
|
||||
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "Bad arguments, "
|
||||
"expected one string argument", 0);
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
intl_errors_reset(&objval->error);
|
||||
|
||||
|
@ -457,7 +457,7 @@ static void php_converter_do_get_encoding(php_converter_object *objval, UConvert
|
|||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "Expected no arguments", 0);
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
intl_errors_reset(&objval->error);
|
||||
|
@ -498,7 +498,7 @@ static void php_converter_do_get_type(php_converter_object *objval, UConverter *
|
|||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "Expected no arguments", 0);
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
intl_errors_reset(&objval->error);
|
||||
|
||||
|
@ -592,7 +592,7 @@ static PHP_METHOD(UConverter, setSubstChars) {
|
|||
int ret = 1;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &chars, &chars_len) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
intl_errors_reset(&objval->error);
|
||||
|
||||
|
@ -637,7 +637,7 @@ static PHP_METHOD(UConverter, getSubstChars) {
|
|||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
|
||||
"UConverter::getSubstChars(): expected no arguments", 0);
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
intl_errors_reset(&objval->error);
|
||||
|
||||
|
@ -725,7 +725,7 @@ static PHP_METHOD(UConverter, reasonText) {
|
|||
zend_long reason;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &reason) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
intl_error_reset(NULL);
|
||||
|
||||
|
@ -758,7 +758,7 @@ static PHP_METHOD(UConverter, convert) {
|
|||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|b",
|
||||
&str, &str_len, &reverse) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
intl_errors_reset(&objval->error);
|
||||
|
||||
|
@ -790,7 +790,7 @@ static PHP_METHOD(UConverter, transcode) {
|
|||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sss|a!",
|
||||
&str, &str_len, &dest, &dest_len, &src, &src_len, &options) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
intl_error_reset(NULL);
|
||||
|
||||
|
@ -847,7 +847,7 @@ static PHP_METHOD(UConverter, getErrorCode) {
|
|||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
|
||||
"UConverter::getErrorCode(): expected no arguments", 0);
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
RETURN_LONG(intl_error_get_code(&(objval->error)));
|
||||
|
@ -864,7 +864,7 @@ static PHP_METHOD(UConverter, getErrorMessage) {
|
|||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
|
||||
"UConverter::getErrorMessage(): expected no arguments", 0);
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (message) {
|
||||
|
@ -885,7 +885,7 @@ static PHP_METHOD(UConverter, getAvailable) {
|
|||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
|
||||
"UConverter::getErrorMessage(): expected no arguments", 0);
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
intl_error_reset(NULL);
|
||||
|
||||
|
@ -908,7 +908,7 @@ static PHP_METHOD(UConverter, getAliases) {
|
|||
uint16_t i, count;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &name, &name_len) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
intl_error_reset(NULL);
|
||||
|
||||
|
@ -943,7 +943,7 @@ static PHP_METHOD(UConverter, getStandards) {
|
|||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
|
||||
"UConverter::getStandards(): expected no arguments", 0);
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
intl_error_reset(NULL);
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ PHP_FUNCTION( datefmt_get_error_code )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, IntlDateFormatter_ce_ptr ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
dfo = Z_INTL_DATEFORMATTER_P( object );
|
||||
|
@ -99,7 +99,7 @@ PHP_FUNCTION( datefmt_get_error_message )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, IntlDateFormatter_ce_ptr ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
dfo = Z_INTL_DATEFORMATTER_P( object );
|
||||
|
|
|
@ -36,7 +36,7 @@ PHP_FUNCTION( datefmt_get_datetype )
|
|||
/* Parse parameters. */
|
||||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O", &object, IntlDateFormatter_ce_ptr ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
@ -60,7 +60,7 @@ PHP_FUNCTION( datefmt_get_timetype )
|
|||
/* Parse parameters. */
|
||||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O", &object, IntlDateFormatter_ce_ptr ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
@ -89,7 +89,7 @@ PHP_FUNCTION( datefmt_get_pattern )
|
|||
/* Parse parameters. */
|
||||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O", &object, IntlDateFormatter_ce_ptr ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
@ -132,7 +132,7 @@ PHP_FUNCTION( datefmt_set_pattern )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Os",
|
||||
&object, IntlDateFormatter_ce_ptr, &value, &value_len ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
DATE_FORMAT_METHOD_FETCH_OBJECT;
|
||||
|
@ -169,7 +169,7 @@ PHP_FUNCTION( datefmt_get_locale )
|
|||
&object, IntlDateFormatter_ce_ptr,&loc_type) == FAILURE )
|
||||
{
|
||||
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
@ -196,7 +196,7 @@ PHP_FUNCTION( datefmt_is_lenient )
|
|||
&object, IntlDateFormatter_ce_ptr ) == FAILURE )
|
||||
{
|
||||
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
@ -221,7 +221,7 @@ PHP_FUNCTION( datefmt_set_lenient )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Ob",
|
||||
&object, IntlDateFormatter_ce_ptr,&isLenient ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
|
|
@ -47,7 +47,7 @@ U_CFUNC PHP_FUNCTION(datefmt_get_timezone_id)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, IntlDateFormatter_ce_ptr ) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
DATE_FORMAT_METHOD_FETCH_OBJECT;
|
||||
|
@ -71,7 +71,7 @@ U_CFUNC PHP_FUNCTION(datefmt_get_timezone)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, IntlDateFormatter_ce_ptr ) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
DATE_FORMAT_METHOD_FETCH_OBJECT;
|
||||
|
@ -99,7 +99,7 @@ U_CFUNC PHP_FUNCTION(datefmt_set_timezone)
|
|||
|
||||
if ( zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"Oz", &object, IntlDateFormatter_ce_ptr, &timezone_zv) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
DATE_FORMAT_METHOD_FETCH_OBJECT;
|
||||
|
@ -124,7 +124,7 @@ U_CFUNC PHP_FUNCTION(datefmt_get_calendar)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, IntlDateFormatter_ce_ptr ) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
DATE_FORMAT_METHOD_FETCH_OBJECT;
|
||||
|
@ -149,7 +149,7 @@ U_CFUNC PHP_FUNCTION(datefmt_get_calendar_object)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, IntlDateFormatter_ce_ptr ) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
DATE_FORMAT_METHOD_FETCH_OBJECT;
|
||||
|
@ -183,7 +183,7 @@ U_CFUNC PHP_FUNCTION(datefmt_set_calendar)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Oz",
|
||||
&object, IntlDateFormatter_ce_ptr, &calendar_zv) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
DATE_FORMAT_METHOD_FETCH_OBJECT;
|
||||
|
|
|
@ -161,7 +161,7 @@ PHP_FUNCTION(datefmt_format)
|
|||
&object, IntlDateFormatter_ce_ptr, &zarg) == FAILURE) {
|
||||
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_format: unable "
|
||||
"to parse input params", 0 );
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
DATE_FORMAT_METHOD_FETCH_OBJECT;
|
||||
|
|
|
@ -79,7 +79,7 @@ U_CFUNC PHP_FUNCTION(datefmt_format_object)
|
|||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "o|zs!",
|
||||
&object, &format, &locale_str, &locale_len) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!locale_str) {
|
||||
|
|
|
@ -135,7 +135,7 @@ PHP_FUNCTION(datefmt_parse)
|
|||
/* Parse parameters. */
|
||||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Os|z!",
|
||||
&object, IntlDateFormatter_ce_ptr, &text_to_parse, &text_len, &z_parse_pos ) == FAILURE ){
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
@ -179,7 +179,7 @@ PHP_FUNCTION(datefmt_localtime)
|
|||
/* Parse parameters. */
|
||||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Os|z!",
|
||||
&object, IntlDateFormatter_ce_ptr, &text_to_parse, &text_len, &z_parse_pos ) == FAILURE ){
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
|
|
@ -37,7 +37,7 @@ PHP_FUNCTION( numfmt_get_attribute )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Ol",
|
||||
&object, NumberFormatter_ce_ptr, &attribute ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
@ -107,7 +107,7 @@ PHP_FUNCTION( numfmt_get_text_attribute )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Ol",
|
||||
&object, NumberFormatter_ce_ptr, &attribute ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
@ -145,7 +145,7 @@ PHP_FUNCTION( numfmt_set_attribute )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Olz",
|
||||
&object, NumberFormatter_ce_ptr, &attribute, &value ) == FAILURE)
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
@ -205,7 +205,7 @@ PHP_FUNCTION( numfmt_set_text_attribute )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Ols",
|
||||
&object, NumberFormatter_ce_ptr, &attribute, &value, &len ) == FAILURE)
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
@ -243,7 +243,7 @@ PHP_FUNCTION( numfmt_get_symbol )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Ol",
|
||||
&object, NumberFormatter_ce_ptr, &symbol ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if(symbol >= UNUM_FORMAT_SYMBOL_COUNT || symbol < 0) {
|
||||
|
@ -289,7 +289,7 @@ PHP_FUNCTION( numfmt_set_symbol )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Ols",
|
||||
&object, NumberFormatter_ce_ptr, &symbol, &value, &value_len ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (symbol >= UNUM_FORMAT_SYMBOL_COUNT || symbol < 0) {
|
||||
|
@ -331,7 +331,7 @@ PHP_FUNCTION( numfmt_get_pattern )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, NumberFormatter_ce_ptr ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
@ -371,7 +371,7 @@ PHP_FUNCTION( numfmt_set_pattern )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Os",
|
||||
&object, NumberFormatter_ce_ptr, &value, &value_len ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
FORMATTER_METHOD_FETCH_OBJECT;
|
||||
|
@ -406,7 +406,7 @@ PHP_FUNCTION( numfmt_get_locale )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O|l",
|
||||
&object, NumberFormatter_ce_ptr, &type ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
|
|
@ -42,7 +42,7 @@ PHP_FUNCTION( numfmt_format )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Oz|l",
|
||||
&object, NumberFormatter_ce_ptr, &number, &type ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
@ -145,7 +145,7 @@ PHP_FUNCTION( numfmt_format_currency )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Ods",
|
||||
&object, NumberFormatter_ce_ptr, &number, ¤cy, ¤cy_len ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
|
|
@ -112,7 +112,7 @@ PHP_FUNCTION( numfmt_get_error_code )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, NumberFormatter_ce_ptr ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
nfo = Z_INTL_NUMBERFORMATTER_P(object);
|
||||
|
@ -136,7 +136,7 @@ PHP_FUNCTION( numfmt_get_error_message )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, NumberFormatter_ce_ptr ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
nfo = Z_INTL_NUMBERFORMATTER_P(object);
|
||||
|
|
|
@ -52,7 +52,7 @@ PHP_FUNCTION( numfmt_parse )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Os|lz!",
|
||||
&object, NumberFormatter_ce_ptr, &str, &str_len, &type, &zposition ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if(zposition) {
|
||||
|
@ -134,7 +134,7 @@ PHP_FUNCTION( numfmt_parse_currency )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Osz/|z!",
|
||||
&object, NumberFormatter_ce_ptr, &str, &str_len, &zcurrency, &zposition ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
|
|
@ -61,7 +61,7 @@ PHP_FUNCTION(grapheme_strlen)
|
|||
UErrorCode status;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &string, &string_len) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
ret_len = grapheme_ascii_check((unsigned char *)string, string_len);
|
||||
|
@ -112,7 +112,7 @@ PHP_FUNCTION(grapheme_strpos)
|
|||
zend_long ret_pos;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len, &loffset) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if ( OUTSIDE_STRING(loffset, haystack_len) ) {
|
||||
|
@ -173,7 +173,7 @@ PHP_FUNCTION(grapheme_stripos)
|
|||
int is_ascii;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len, &loffset) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if ( OUTSIDE_STRING(loffset, haystack_len) ) {
|
||||
|
@ -240,7 +240,7 @@ PHP_FUNCTION(grapheme_strrpos)
|
|||
int is_ascii;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len, &loffset) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if ( OUTSIDE_STRING(loffset, haystack_len) ) {
|
||||
|
@ -301,7 +301,7 @@ PHP_FUNCTION(grapheme_strripos)
|
|||
int is_ascii;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|l", &haystack, &haystack_len, &needle, &needle_len, &loffset) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if ( OUTSIDE_STRING(loffset, haystack_len) ) {
|
||||
|
@ -379,7 +379,7 @@ PHP_FUNCTION(grapheme_substr)
|
|||
zend_bool no_length = 1;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|l!", &str, &str_len, &lstart, &length, &no_length) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if ( OUTSIDE_STRING(lstart, str_len)) {
|
||||
|
@ -584,7 +584,7 @@ static void strstr_common_handler(INTERNAL_FUNCTION_PARAMETERS, int f_ignore_cas
|
|||
zend_bool part = 0;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|b", &haystack, &haystack_len, &needle, &needle_len, &part) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (needle_len == 0) {
|
||||
|
@ -771,7 +771,7 @@ PHP_FUNCTION(grapheme_extract)
|
|||
zval *next = NULL; /* return offset of next part of the string */
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|llz", &str, &str_len, &size, &extract_type, &lstart, &next) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (lstart < 0) {
|
||||
|
|
|
@ -183,7 +183,7 @@ static void php_intl_idn_handoff(INTERNAL_FUNCTION_PARAMETERS, int mode)
|
|||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|llz",
|
||||
&domain, &option, &variant, &idna_info) == FAILURE) {
|
||||
RETURN_NULL(); /* don't set FALSE because that's not the way it was before... */
|
||||
return;
|
||||
}
|
||||
|
||||
if (variant != INTL_IDN_VARIANT_UTS46) {
|
||||
|
|
|
@ -225,7 +225,7 @@ PHP_NAMED_FUNCTION(zif_locale_set_default)
|
|||
|
||||
if(zend_parse_parameters( ZEND_NUM_ARGS(), "S", &locale_name) == FAILURE)
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (ZSTR_LEN(locale_name) == 0) {
|
||||
|
@ -392,7 +392,7 @@ static void get_icu_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAMETERS)
|
|||
|
||||
if(zend_parse_parameters( ZEND_NUM_ARGS(), "s",
|
||||
&loc_name ,&loc_name_len ) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if(loc_name_len == 0) {
|
||||
|
@ -497,7 +497,7 @@ static void get_icu_disp_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAME
|
|||
&loc_name, &loc_name_len ,
|
||||
&disp_loc_name ,&disp_loc_name_len ) == FAILURE)
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if(loc_name_len > ULOC_FULLNAME_CAPACITY) {
|
||||
|
@ -686,7 +686,7 @@ PHP_FUNCTION( locale_get_keywords )
|
|||
if(zend_parse_parameters( ZEND_NUM_ARGS(), "s",
|
||||
&loc_name, &loc_name_len ) == FAILURE)
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
INTL_CHECK_LOCALE_LEN(strlen(loc_name));
|
||||
|
@ -905,7 +905,7 @@ PHP_FUNCTION(locale_compose)
|
|||
if(zend_parse_parameters( ZEND_NUM_ARGS(), "a",
|
||||
&arr) == FAILURE)
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
hash_arr = Z_ARRVAL_P( arr );
|
||||
|
@ -1091,7 +1091,7 @@ PHP_FUNCTION(locale_parse)
|
|||
if(zend_parse_parameters( ZEND_NUM_ARGS(), "s",
|
||||
&loc_name, &loc_name_len ) == FAILURE)
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
INTL_CHECK_LOCALE_LEN(strlen(loc_name));
|
||||
|
@ -1138,7 +1138,7 @@ PHP_FUNCTION(locale_get_all_variants)
|
|||
if(zend_parse_parameters( ZEND_NUM_ARGS(), "s",
|
||||
&loc_name, &loc_name_len ) == FAILURE)
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if(loc_name_len == 0) {
|
||||
|
@ -1241,7 +1241,7 @@ PHP_FUNCTION(locale_filter_matches)
|
|||
&lang_tag, &lang_tag_len , &loc_range , &loc_range_len ,
|
||||
&boolCanonical) == FAILURE)
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if(loc_range_len == 0) {
|
||||
|
@ -1514,7 +1514,7 @@ PHP_FUNCTION(locale_lookup)
|
|||
|
||||
if(zend_parse_parameters( ZEND_NUM_ARGS(), "as|bS!", &arr, &loc_range, &loc_range_len,
|
||||
&boolCanonical, &fallback_loc_str) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if(loc_range_len == 0) {
|
||||
|
@ -1567,7 +1567,7 @@ PHP_FUNCTION(locale_accept_from_http)
|
|||
|
||||
if(zend_parse_parameters( ZEND_NUM_ARGS(), "s", &http_accept, &http_accept_len) == FAILURE)
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
if(http_accept_len > ULOC_FULLNAME_CAPACITY) {
|
||||
/* check each fragment, if any bigger than capacity, can't do it due to bug #72533 */
|
||||
|
|
|
@ -132,7 +132,7 @@ PHP_FUNCTION( msgfmt_get_error_code )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, MessageFormatter_ce_ptr ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
mfo = Z_INTL_MESSAGEFORMATTER_P( object );
|
||||
|
@ -157,7 +157,7 @@ PHP_FUNCTION( msgfmt_get_error_message )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, MessageFormatter_ce_ptr ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
mfo = Z_INTL_MESSAGEFORMATTER_P( object );
|
||||
|
|
|
@ -36,7 +36,7 @@ PHP_FUNCTION( msgfmt_get_pattern )
|
|||
/* Parse parameters. */
|
||||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O", &object, MessageFormatter_ce_ptr ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
@ -67,7 +67,7 @@ PHP_FUNCTION( msgfmt_set_pattern )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Os",
|
||||
&object, MessageFormatter_ce_ptr, &value, &value_len ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
MSG_FORMAT_METHOD_FETCH_OBJECT;
|
||||
|
@ -121,7 +121,7 @@ PHP_FUNCTION( msgfmt_get_locale )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, MessageFormatter_ce_ptr ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
|
|
@ -63,7 +63,7 @@ PHP_FUNCTION( msgfmt_format )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Oa",
|
||||
&object, MessageFormatter_ce_ptr, &args ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
@ -94,7 +94,7 @@ PHP_FUNCTION( msgfmt_format_message )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "ssa",
|
||||
&slocale, &slocale_len, &pattern, &pattern_len, &args ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
INTL_CHECK_LOCALE_LEN(slocale_len);
|
||||
|
|
|
@ -67,7 +67,7 @@ PHP_FUNCTION( msgfmt_parse )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Os",
|
||||
&object, MessageFormatter_ce_ptr, &source, &source_len ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object. */
|
||||
|
@ -99,7 +99,7 @@ PHP_FUNCTION( msgfmt_parse_message )
|
|||
if( zend_parse_parameters( ZEND_NUM_ARGS(), "sss",
|
||||
&slocale, &slocale_len, &pattern, &pattern_len, &source, &src_len ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
INTL_CHECK_LOCALE_LEN(slocale_len);
|
||||
|
|
|
@ -107,7 +107,7 @@ PHP_FUNCTION( normalizer_normalize )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "s|l",
|
||||
&input, &input_len, &form ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
expansion_factor = 1;
|
||||
|
@ -244,7 +244,7 @@ PHP_FUNCTION( normalizer_is_normalized )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "s|l",
|
||||
&input, &input_len, &form) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
switch(form) {
|
||||
|
|
|
@ -254,7 +254,7 @@ PHP_FUNCTION( resourcebundle_get )
|
|||
zval * object;
|
||||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Oz|b", &object, ResourceBundle_ce_ptr, &offset, &fallback ) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
resourcebundle_array_fetch(Z_OBJ_P(object), offset, return_value, fallback);
|
||||
|
@ -293,7 +293,7 @@ PHP_FUNCTION( resourcebundle_count )
|
|||
RESOURCEBUNDLE_METHOD_INIT_VARS;
|
||||
|
||||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O", &object, ResourceBundle_ce_ptr ) == FAILURE ) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
RESOURCEBUNDLE_METHOD_FETCH_OBJECT;
|
||||
|
@ -325,7 +325,7 @@ PHP_FUNCTION( resourcebundle_locales )
|
|||
|
||||
if( zend_parse_parameters(ZEND_NUM_ARGS(), "s", &bundlename, &bundlename_len ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (bundlename_len >= MAXPATHLEN) {
|
||||
|
@ -368,7 +368,7 @@ PHP_FUNCTION( resourcebundle_get_error_code )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, ResourceBundle_ce_ptr ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
rb = Z_INTL_RESOURCEBUNDLE_P( object );
|
||||
|
@ -394,7 +394,7 @@ PHP_FUNCTION( resourcebundle_get_error_message )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, ResourceBundle_ce_ptr ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
rb = Z_INTL_RESOURCEBUNDLE_P( object );
|
||||
|
|
|
@ -32,7 +32,7 @@ PHP_METHOD(Spoofchecker, __construct)
|
|||
zend_error_handling error_handling;
|
||||
SPOOFCHECKER_METHOD_INIT_VARS;
|
||||
|
||||
if (zend_parse_parameters_none_throw() == FAILURE) {
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ U_CFUNC PHP_FUNCTION(intltz_create_time_zone)
|
|||
intl_error_reset(NULL);
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &str_id, &str_id_len) == FAILURE) {
|
||||
RETURN_NULL();
|
||||
return;
|
||||
}
|
||||
|
||||
UErrorCode status = UErrorCode();
|
||||
|
@ -78,7 +78,7 @@ U_CFUNC PHP_FUNCTION(intltz_from_date_time_zone)
|
|||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O",
|
||||
&zv_timezone, php_date_get_timezone_ce()) == FAILURE) {
|
||||
RETURN_NULL();
|
||||
return;
|
||||
}
|
||||
|
||||
tzobj = Z_PHPTIMEZONE_P(zv_timezone);
|
||||
|
@ -103,7 +103,7 @@ U_CFUNC PHP_FUNCTION(intltz_create_default)
|
|||
intl_error_reset(NULL);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_NULL();
|
||||
return;
|
||||
}
|
||||
|
||||
TimeZone *tz = TimeZone::createDefault();
|
||||
|
@ -115,7 +115,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_gmt)
|
|||
intl_error_reset(NULL);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_NULL();
|
||||
return;
|
||||
}
|
||||
|
||||
timezone_object_construct(TimeZone::getGMT(), return_value, 0);
|
||||
|
@ -126,7 +126,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_unknown)
|
|||
intl_error_reset(NULL);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_NULL();
|
||||
return;
|
||||
}
|
||||
|
||||
timezone_object_construct(&TimeZone::getUnknown(), return_value, 0);
|
||||
|
@ -141,7 +141,7 @@ U_CFUNC PHP_FUNCTION(intltz_create_enumeration)
|
|||
/* double indirection to have the zend engine destroy the new zval that
|
||||
* results from separation */
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|z", &arg) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (arg == NULL || Z_TYPE_P(arg) == IS_NULL) {
|
||||
|
@ -201,7 +201,7 @@ U_CFUNC PHP_FUNCTION(intltz_count_equivalent_ids)
|
|||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s",
|
||||
&str_id, &str_id_len) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
UErrorCode status = UErrorCode();
|
||||
|
@ -230,7 +230,7 @@ U_CFUNC PHP_FUNCTION(intltz_create_time_zone_id_enumeration)
|
|||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|s!l!",
|
||||
&zoneType, ®ion, ®ion_len, &offset_arg, &arg3isnull) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (zoneType != UCAL_ZONE_TYPE_ANY && zoneType != UCAL_ZONE_TYPE_CANONICAL
|
||||
|
@ -269,7 +269,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_canonical_id)
|
|||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|z",
|
||||
&str_id, &str_id_len, &is_systemid) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
UErrorCode status = UErrorCode();
|
||||
|
@ -306,7 +306,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_region)
|
|||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s",
|
||||
&str_id, &str_id_len) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
UErrorCode status = UErrorCode();
|
||||
|
@ -328,7 +328,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_tz_data_version)
|
|||
intl_error_reset(NULL);
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
UErrorCode status = UErrorCode();
|
||||
|
@ -346,9 +346,11 @@ U_CFUNC PHP_FUNCTION(intltz_get_equivalent_id)
|
|||
zend_long index;
|
||||
intl_error_reset(NULL);
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl",
|
||||
&str_id, &str_id_len, &index) == FAILURE ||
|
||||
index < (zend_long)INT32_MIN || index > (zend_long)INT32_MAX) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl", &str_id, &str_id_len, &index) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (index < (zend_long)INT32_MIN || index > (zend_long)INT32_MAX) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
@ -375,7 +377,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_id)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, TimeZone_ce_ptr) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
TIMEZONE_METHOD_FETCH_OBJECT;
|
||||
|
@ -398,7 +400,7 @@ U_CFUNC PHP_FUNCTION(intltz_use_daylight_time)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, TimeZone_ce_ptr) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
TIMEZONE_METHOD_FETCH_OBJECT;
|
||||
|
@ -419,7 +421,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_offset)
|
|||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"Odbz/z/", &object, TimeZone_ce_ptr, &date, &local, &rawOffsetArg,
|
||||
&dstOffsetArg) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
TIMEZONE_METHOD_FETCH_OBJECT;
|
||||
|
@ -443,7 +445,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_raw_offset)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"O", &object, TimeZone_ce_ptr) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
TIMEZONE_METHOD_FETCH_OBJECT;
|
||||
|
@ -460,7 +462,7 @@ U_CFUNC PHP_FUNCTION(intltz_has_same_rules)
|
|||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"OO", &object, TimeZone_ce_ptr, &other_object, TimeZone_ce_ptr)
|
||||
== FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
TIMEZONE_METHOD_FETCH_OBJECT;
|
||||
other_to = Z_INTL_TIMEZONE_P(other_object);
|
||||
|
@ -491,7 +493,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_display_name)
|
|||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"O|bls!", &object, TimeZone_ce_ptr, &daylight, &display_type,
|
||||
&locale_str, &dummy) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
bool found = false;
|
||||
|
@ -528,7 +530,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_dst_savings)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"O", &object, TimeZone_ce_ptr) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
TIMEZONE_METHOD_FETCH_OBJECT;
|
||||
|
@ -543,7 +545,7 @@ U_CFUNC PHP_FUNCTION(intltz_to_date_time_zone)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
|
||||
"O", &object, TimeZone_ce_ptr) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
TIMEZONE_METHOD_FETCH_OBJECT;
|
||||
|
@ -564,7 +566,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_error_code)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, TimeZone_ce_ptr) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object (without resetting its last error code ). */
|
||||
|
@ -582,7 +584,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_error_message)
|
|||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, TimeZone_ce_ptr) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ PHP_FUNCTION( transliterator_create )
|
|||
if( zend_parse_parameters( ZEND_NUM_ARGS(), "s|l",
|
||||
&str_id, &str_id_len, &direction ) == FAILURE )
|
||||
{
|
||||
RETURN_NULL();
|
||||
return;
|
||||
}
|
||||
|
||||
object = return_value;
|
||||
|
@ -145,7 +145,7 @@ PHP_FUNCTION( transliterator_create_from_rules )
|
|||
if( zend_parse_parameters( ZEND_NUM_ARGS(), "s|l",
|
||||
&str_rules, &str_rules_len, &direction ) == FAILURE )
|
||||
{
|
||||
RETURN_NULL();
|
||||
return;
|
||||
}
|
||||
|
||||
if( ( direction != TRANSLITERATOR_FORWARD ) && (direction != TRANSLITERATOR_REVERSE ) )
|
||||
|
@ -208,7 +208,7 @@ PHP_FUNCTION( transliterator_create_inverse )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, Transliterator_ce_ptr ) == FAILURE )
|
||||
{
|
||||
RETURN_NULL();
|
||||
return;
|
||||
}
|
||||
|
||||
TRANSLITERATOR_METHOD_FETCH_OBJECT;
|
||||
|
@ -304,7 +304,7 @@ PHP_FUNCTION( transliterator_transliterate )
|
|||
if( zend_parse_parameters( ZEND_NUM_ARGS(), "zs|ll",
|
||||
&arg1, &str, &str_len, &start, &limit ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if( Z_TYPE_P( arg1 ) == IS_OBJECT &&
|
||||
|
@ -336,7 +336,7 @@ PHP_FUNCTION( transliterator_transliterate )
|
|||
else if( zend_parse_parameters( ZEND_NUM_ARGS(), "s|ll",
|
||||
&str, &str_len, &start, &limit ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if( limit < -1 )
|
||||
|
@ -462,7 +462,7 @@ PHP_FUNCTION( transliterator_get_error_code )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, Transliterator_ce_ptr ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the object (without resetting its last error code ). */
|
||||
|
@ -487,7 +487,7 @@ PHP_FUNCTION( transliterator_get_error_message )
|
|||
if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O",
|
||||
&object, Transliterator_ce_ptr ) == FAILURE )
|
||||
{
|
||||
RETURN_FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -55,11 +55,14 @@ IC_METHOD(chr) {
|
|||
char buffer[5];
|
||||
int buffer_len = 0;
|
||||
|
||||
if ((zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) ||
|
||||
(convert_cp(&cp, zcp) == FAILURE)) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (convert_cp(&cp, zcp) == FAILURE) {
|
||||
RETURN_NULL();
|
||||
}
|
||||
|
||||
/* We can use unsafe because we know the codepoint is in valid range
|
||||
* and that 4 bytes is enough for any unicode point
|
||||
*/
|
||||
|
@ -80,11 +83,14 @@ IC_METHOD(ord) {
|
|||
UChar32 cp;
|
||||
zval *zcp;
|
||||
|
||||
if ((zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) ||
|
||||
(convert_cp(&cp, zcp) == FAILURE)) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (convert_cp(&cp, zcp) == FAILURE) {
|
||||
RETURN_NULL();
|
||||
}
|
||||
|
||||
RETURN_LONG(cp);
|
||||
}
|
||||
/* }}} */
|
||||
|
@ -99,11 +105,14 @@ IC_METHOD(hasBinaryProperty) {
|
|||
zend_long prop;
|
||||
zval *zcp;
|
||||
|
||||
if ((zend_parse_parameters(ZEND_NUM_ARGS(), "zl", &zcp, &prop) == FAILURE) ||
|
||||
(convert_cp(&cp, zcp) == FAILURE)) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zl", &zcp, &prop) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (convert_cp(&cp, zcp) == FAILURE) {
|
||||
RETURN_NULL();
|
||||
}
|
||||
|
||||
RETURN_BOOL(u_hasBinaryProperty(cp, (UProperty)prop));
|
||||
}
|
||||
/* }}} */
|
||||
|
@ -118,11 +127,14 @@ IC_METHOD(getIntPropertyValue) {
|
|||
zend_long prop;
|
||||
zval *zcp;
|
||||
|
||||
if ((zend_parse_parameters(ZEND_NUM_ARGS(), "zl", &zcp, &prop) == FAILURE) ||
|
||||
(convert_cp(&cp, zcp) == FAILURE)) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zl", &zcp, &prop) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (convert_cp(&cp, zcp) == FAILURE) {
|
||||
RETURN_NULL();
|
||||
}
|
||||
|
||||
RETURN_LONG(u_getIntPropertyValue(cp, (UProperty)prop));
|
||||
}
|
||||
/* }}} */
|
||||
|
@ -165,11 +177,14 @@ IC_METHOD(getNumericValue) {
|
|||
UChar32 cp;
|
||||
zval *zcp;
|
||||
|
||||
if ((zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) ||
|
||||
(convert_cp(&cp, zcp) == FAILURE)) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (convert_cp(&cp, zcp) == FAILURE) {
|
||||
RETURN_NULL();
|
||||
}
|
||||
|
||||
RETURN_DOUBLE(u_getNumericValue(cp));
|
||||
}
|
||||
/* }}} */
|
||||
|
@ -227,11 +242,14 @@ IC_METHOD(getBlockCode) {
|
|||
UChar32 cp;
|
||||
zval *zcp;
|
||||
|
||||
if ((zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) ||
|
||||
(convert_cp(&cp, zcp) == FAILURE)) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (convert_cp(&cp, zcp) == FAILURE) {
|
||||
RETURN_NULL();
|
||||
}
|
||||
|
||||
RETURN_LONG(ublock_getCode(cp));
|
||||
}
|
||||
/* }}} */
|
||||
|
@ -249,8 +267,11 @@ IC_METHOD(charName) {
|
|||
zend_string *buffer = NULL;
|
||||
int32_t buffer_len;
|
||||
|
||||
if ((zend_parse_parameters(ZEND_NUM_ARGS(), "z|l", &zcp, &nameChoice) == FAILURE) ||
|
||||
(convert_cp(&cp, zcp) == FAILURE)) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|l", &zcp, &nameChoice) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (convert_cp(&cp, zcp) == FAILURE) {
|
||||
RETURN_NULL();
|
||||
}
|
||||
|
||||
|
@ -279,7 +300,7 @@ IC_METHOD(charFromName) {
|
|||
UErrorCode error = U_ZERO_ERROR;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &name, &name_len, &nameChoice) == FAILURE) {
|
||||
RETURN_NULL();
|
||||
return;
|
||||
}
|
||||
|
||||
ret = u_charFromName((UCharNameChoice)nameChoice, name, &error);
|
||||
|
@ -332,12 +353,14 @@ IC_METHOD(enumCharNames) {
|
|||
zend_long nameChoice = U_UNICODE_CHAR_NAME;
|
||||
UErrorCode error = U_ZERO_ERROR;
|
||||
|
||||
if ((zend_parse_parameters(ZEND_NUM_ARGS(), "zzf|l", &zstart, &zlimit, &context.fci, &context.fci_cache, &nameChoice) == FAILURE) ||
|
||||
(convert_cp(&start, zstart) == FAILURE) ||
|
||||
(convert_cp(&limit, zlimit) == FAILURE)) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zzf|l", &zstart, &zlimit, &context.fci, &context.fci_cache, &nameChoice) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (convert_cp(&start, zstart) == FAILURE || convert_cp(&limit, zlimit) == FAILURE) {
|
||||
RETURN_NULL();
|
||||
}
|
||||
|
||||
u_enumCharNames(start, limit, (UEnumCharNamesFn*)enumCharNames_callback, &context, nameChoice, &error);
|
||||
INTL_CHECK_STATUS(error, NULL);
|
||||
}
|
||||
|
@ -437,11 +460,14 @@ IC_METHOD(foldCase) {
|
|||
zval *zcp;
|
||||
zend_long options = U_FOLD_CASE_DEFAULT;
|
||||
|
||||
if ((zend_parse_parameters(ZEND_NUM_ARGS(), "z|l", &zcp, &options) == FAILURE) ||
|
||||
(convert_cp(&cp, zcp) == FAILURE)) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|l", &zcp, &options) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (convert_cp(&cp, zcp) == FAILURE) {
|
||||
RETURN_NULL();
|
||||
}
|
||||
|
||||
ret = u_foldCase(cp, options);
|
||||
if (Z_TYPE_P(zcp) == IS_STRING) {
|
||||
char buffer[5];
|
||||
|
@ -466,11 +492,14 @@ IC_METHOD(digit) {
|
|||
zend_long radix = 10;
|
||||
int ret;
|
||||
|
||||
if ((zend_parse_parameters(ZEND_NUM_ARGS(), "z|l", &zcp, &radix) == FAILURE) ||
|
||||
(convert_cp(&cp, zcp) == FAILURE)) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|l", &zcp, &radix) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (convert_cp(&cp, zcp) == FAILURE) {
|
||||
RETURN_NULL();
|
||||
}
|
||||
|
||||
ret = u_digit(cp, radix);
|
||||
if (ret < 0) {
|
||||
intl_error_set_code(NULL, U_ILLEGAL_ARGUMENT_ERROR);
|
||||
|
@ -507,11 +536,14 @@ IC_METHOD(charAge) {
|
|||
UVersionInfo version;
|
||||
int i;
|
||||
|
||||
if ((zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) ||
|
||||
(convert_cp(&cp, zcp) == FAILURE)) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (convert_cp(&cp, zcp) == FAILURE) {
|
||||
RETURN_NULL();
|
||||
}
|
||||
|
||||
u_charAge(cp, version);
|
||||
array_init(return_value);
|
||||
for(i = 0; i < U_MAX_VERSION_LENGTH; ++i) {
|
||||
|
@ -548,11 +580,14 @@ IC_METHOD(getFC_NFKC_Closure) {
|
|||
int32_t closure_len;
|
||||
UErrorCode error = U_ZERO_ERROR;
|
||||
|
||||
if ((zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) ||
|
||||
(convert_cp(&cp, zcp) == FAILURE)) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zcp) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (convert_cp(&cp, zcp) == FAILURE) {
|
||||
RETURN_NULL();
|
||||
}
|
||||
|
||||
closure_len = u_getFC_NFKC_Closure(cp, NULL, 0, &error);
|
||||
if (closure_len == 0) {
|
||||
RETURN_EMPTY_STRING();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue