summaryrefslogtreecommitdiff
path: root/ext/date
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2020-01-02 22:56:45 +0100
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-01-02 23:01:37 +0100
commit1b93cfee0ca23d95893fa6ecd53d0a0c02aeb7bf (patch)
tree012ab6c1b39562f2829e9b97b433b2b900178a0d /ext/date
parentd3b911952b9ed99cf6695910452d8546ec05a4c4 (diff)
downloadphp-git-1b93cfee0ca23d95893fa6ecd53d0a0c02aeb7bf.tar.gz
Use RETURN_THROWS() after zend_parse_method_parameters()
Diffstat (limited to 'ext/date')
-rw-r--r--ext/date/php_date.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index 13fd7e005e..74f85d29fe 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -2838,7 +2838,7 @@ PHP_FUNCTION(date_format)
size_t format_len;
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Os", &object, date_ce_interface, &format, &format_len) == FAILURE) {
- RETURN_FALSE;
+ RETURN_THROWS();
}
dateobj = Z_PHPDATE_P(object);
DATE_CHECK_INITIALIZED(dateobj->time, DateTime);
@@ -2924,7 +2924,7 @@ PHP_FUNCTION(date_modify)
size_t modify_len;
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Os", &object, date_ce_date, &modify, &modify_len) == FAILURE) {
- RETURN_FALSE;
+ RETURN_THROWS();
}
if (!php_date_modify(object, modify, modify_len)) {
@@ -2982,7 +2982,7 @@ PHP_FUNCTION(date_add)
zval *object, *interval;
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "OO", &object, date_ce_date, &interval, date_ce_interval) == FAILURE) {
- RETURN_FALSE;
+ RETURN_THROWS();
}
php_date_add(object, interval, return_value);
@@ -3039,7 +3039,7 @@ PHP_FUNCTION(date_sub)
zval *object, *interval;
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "OO", &object, date_ce_date, &interval, date_ce_interval) == FAILURE) {
- RETURN_FALSE;
+ RETURN_THROWS();
}
php_date_sub(object, interval, return_value);
@@ -3096,7 +3096,7 @@ PHP_FUNCTION(date_timezone_get)
php_date_obj *dateobj;
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O", &object, date_ce_interface) == FAILURE) {
- RETURN_FALSE;
+ RETURN_THROWS();
}
dateobj = Z_PHPDATE_P(object);
DATE_CHECK_INITIALIZED(dateobj->time, DateTime);
@@ -3143,7 +3143,7 @@ PHP_FUNCTION(date_timezone_set)
zval *timezone_object;
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "OO", &object, date_ce_date, &timezone_object, date_ce_timezone) == FAILURE) {
- RETURN_FALSE;
+ RETURN_THROWS();
}
php_date_timezone_set(object, timezone_object, return_value);
@@ -3182,7 +3182,7 @@ PHP_FUNCTION(date_offset_get)
timelib_time_offset *offset;
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O", &object, date_ce_interface) == FAILURE) {
- RETURN_FALSE;
+ RETURN_THROWS();
}
dateobj = Z_PHPDATE_P(object);
DATE_CHECK_INITIALIZED(dateobj->time, DateTime);
@@ -3229,7 +3229,7 @@ PHP_FUNCTION(date_time_set)
zend_long h, i, s = 0, ms = 0;
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Oll|ll", &object, date_ce_date, &h, &i, &s, &ms) == FAILURE) {
- RETURN_FALSE;
+ RETURN_THROWS();
}
php_date_time_set(object, h, i, s, ms, return_value);
@@ -3279,7 +3279,7 @@ PHP_FUNCTION(date_date_set)
zend_long y, m, d;
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Olll", &object, date_ce_date, &y, &m, &d) == FAILURE) {
- RETURN_FALSE;
+ RETURN_THROWS();
}
php_date_date_set(object, y, m, d, return_value);
@@ -3333,7 +3333,7 @@ PHP_FUNCTION(date_isodate_set)
zend_long y, w, d = 1;
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Oll|l", &object, date_ce_date, &y, &w, &d) == FAILURE) {
- RETURN_FALSE;
+ RETURN_THROWS();
}
php_date_isodate_set(object, y, w, d, return_value);
@@ -3382,7 +3382,7 @@ PHP_FUNCTION(date_timestamp_set)
zend_long timestamp;
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Ol", &object, date_ce_date, &timestamp) == FAILURE) {
- RETURN_FALSE;
+ RETURN_THROWS();
}
php_date_timestamp_set(object, timestamp, return_value);
@@ -3422,7 +3422,7 @@ PHP_FUNCTION(date_timestamp_get)
int error;
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O", &object, date_ce_interface) == FAILURE) {
- RETURN_FALSE;
+ RETURN_THROWS();
}
dateobj = Z_PHPDATE_P(object);
DATE_CHECK_INITIALIZED(dateobj->time, DateTime);
@@ -3448,7 +3448,7 @@ PHP_FUNCTION(date_diff)
zend_bool absolute = 0;
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "OO|b", &object1, date_ce_interface, &object2, date_ce_interface, &absolute) == FAILURE) {
- RETURN_FALSE;
+ RETURN_THROWS();
}
dateobj1 = Z_PHPDATE_P(object1);
dateobj2 = Z_PHPDATE_P(object2);
@@ -3606,7 +3606,7 @@ PHP_FUNCTION(timezone_name_get)
php_timezone_obj *tzobj;
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O", &object, date_ce_timezone) == FAILURE) {
- RETURN_FALSE;
+ RETURN_THROWS();
}
tzobj = Z_PHPTIMEZONE_P(object);
DATE_CHECK_INITIALIZED(tzobj->initialized, DateTimeZone);
@@ -3652,7 +3652,7 @@ PHP_FUNCTION(timezone_offset_get)
timelib_time_offset *offset;
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "OO", &object, date_ce_timezone, &dateobject, date_ce_interface) == FAILURE) {
- RETURN_FALSE;
+ RETURN_THROWS();
}
tzobj = Z_PHPTIMEZONE_P(object);
DATE_CHECK_INITIALIZED(tzobj->initialized, DateTimeZone);
@@ -3686,7 +3686,7 @@ PHP_FUNCTION(timezone_transitions_get)
zend_long timestamp_begin = ZEND_LONG_MIN, timestamp_end = ZEND_LONG_MAX;
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O|ll", &object, date_ce_timezone, &timestamp_begin, &timestamp_end) == FAILURE) {
- RETURN_FALSE;
+ RETURN_THROWS();
}
tzobj = Z_PHPTIMEZONE_P(object);
DATE_CHECK_INITIALIZED(tzobj->initialized, DateTimeZone);
@@ -3765,7 +3765,7 @@ PHP_FUNCTION(timezone_location_get)
php_timezone_obj *tzobj;
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O", &object, date_ce_timezone) == FAILURE) {
- RETURN_FALSE;
+ RETURN_THROWS();
}
tzobj = Z_PHPTIMEZONE_P(object);
DATE_CHECK_INITIALIZED(tzobj->initialized, DateTimeZone);
@@ -4195,7 +4195,7 @@ PHP_FUNCTION(date_interval_format)
size_t format_len;
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Os", &object, date_ce_interval, &format, &format_len) == FAILURE) {
- RETURN_FALSE;
+ RETURN_THROWS();
}
diobj = Z_PHPINTERVAL_P(object);
DATE_CHECK_INITIALIZED(diobj->initialized, DateInterval);