summaryrefslogtreecommitdiff
path: root/ext/date/php_date.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/date/php_date.c')
-rw-r--r--ext/date/php_date.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index b3f6a27c9d..7ca3aad266 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -2670,9 +2670,7 @@ PHP_METHOD(DateTime, __construct)
zend_replace_error_handling(EH_THROW, NULL, &error_handling);
if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS(), "|sO!", &time_str, &time_str_len, &timezone_object, date_ce_timezone)) {
- if (!php_date_initialize(Z_PHPDATE_P(getThis()), time_str, time_str_len, NULL, timezone_object, 1)) {
- ZEND_CTOR_MAKE_NULL();
- }
+ php_date_initialize(Z_PHPDATE_P(getThis()), time_str, time_str_len, NULL, timezone_object, 1);
}
zend_restore_error_handling(&error_handling);
}
@@ -3679,9 +3677,7 @@ PHP_METHOD(DateTimeZone, __construct)
zend_replace_error_handling(EH_THROW, NULL, &error_handling);
if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS(), "s", &tz, &tz_len)) {
tzobj = Z_PHPTIMEZONE_P(getThis());
- if (FAILURE == timezone_initialize(tzobj, tz)) {
- ZEND_CTOR_MAKE_NULL();
- }
+ timezone_initialize(tzobj, tz);
}
zend_restore_error_handling(&error_handling);
}
@@ -4113,8 +4109,6 @@ PHP_METHOD(DateInterval, __construct)
diobj = Z_PHPINTERVAL_P(getThis());
diobj->diff = reltime;
diobj->initialized = 1;
- } else {
- ZEND_CTOR_MAKE_NULL();
}
}
zend_restore_error_handling(&error_handling);