diff options
author | Anatol Belski <ab@php.net> | 2014-06-06 09:06:48 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-06-06 09:06:48 +0200 |
commit | 0e7bf92129f608c44f4d5bd51139ec2bd85fecc8 (patch) | |
tree | c68de7597245cd0f5ce5e59821dffc6f8bb38834 /ext/date/php_date.c | |
parent | df0794469d321a3f8dc0e82ed6a0532e85cbd030 (diff) | |
parent | e16097626a7e86e0baa9fa7d17477b6ffc13c706 (diff) | |
download | php-git-0e7bf92129f608c44f4d5bd51139ec2bd85fecc8.tar.gz |
Merge remote-tracking branch 'origin/master' into str_size_and_int64
* origin/master:
restore correct behavior of DateTime
fix test use invalid code
Fixed startup segfault in non-debug builds Fixes issue #87
PHP 5.4/5.5 compability in phpdbg_watch.c
fix gcov data with some locales (again)
Conflicts:
ext/date/php_date.c
Diffstat (limited to 'ext/date/php_date.c')
-rw-r--r-- | ext/date/php_date.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c index f9dd31a069..a78f766d1a 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2718,7 +2718,9 @@ 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)) { - php_date_initialize(zend_object_store_get_object(getThis() TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 1 TSRMLS_CC); + 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()); + } } zend_restore_error_handling(&error_handling TSRMLS_CC); } |