summaryrefslogtreecommitdiff
path: root/ext/date/php_date.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-03-30 18:53:38 +0300
committerDmitry Stogov <dmitry@zend.com>2015-03-30 18:53:38 +0300
commit1018f462d8bb0a12b238d9d11c141038beaf2a6c (patch)
tree6466aa51c3924c5ed56741e02fa323fcb3e2ece4 /ext/date/php_date.c
parent9155a267adeeb6f442f97892de441e4b6666ce73 (diff)
downloadphp-git-1018f462d8bb0a12b238d9d11c141038beaf2a6c.tar.gz
Patch improvement:
Removed the corresponding core code. Fixed ext/com_dotnet and ext/date. Refactored ext/intl changes. Improved ext/fileinfo and ext/pdo changes. Fixed tests.
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 94d3a19bcd..0021483de1 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);