diff options
author | Remi Collet <remi@php.net> | 2014-06-05 13:45:57 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2014-06-05 13:45:57 +0200 |
commit | 9ea9064779a0de96079755694688a136487ba160 (patch) | |
tree | c3327e95141960a67ef718b82c3b9b36a27f2c66 /ext/date/php_date.c | |
parent | 4b4a5bc1d367fc22528173f8b083eac3a2c29b60 (diff) | |
parent | 3f47368738fe9123fb1b0a5d543ac7607295951d (diff) | |
download | php-git-9ea9064779a0de96079755694688a136487ba160.tar.gz |
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
NEWS
Fix regression introduce in fix for bug #67118
Diffstat (limited to 'ext/date/php_date.c')
-rw-r--r-- | ext/date/php_date.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 1c3de6c6bd..718924178c 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2577,6 +2577,8 @@ PHPAPI int php_date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, err->error_messages[0].position, err->error_messages[0].character, err->error_messages[0].message); } if (err && err->error_count) { + timelib_time_dtor(dateobj->time); + dateobj->time = 0; return 0; } @@ -2724,9 +2726,7 @@ PHP_METHOD(DateTime, __construct) zend_replace_error_handling(EH_THROW, NULL, &error_handling TSRMLS_CC); if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sO!", &time_str, &time_str_len, &timezone_object, date_ce_timezone)) { - if (!php_date_initialize(zend_object_store_get_object(getThis() TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 1 TSRMLS_CC)) { - ZVAL_NULL(getThis()); - } + php_date_initialize(zend_object_store_get_object(getThis() TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 1 TSRMLS_CC); } zend_restore_error_handling(&error_handling TSRMLS_CC); } |