com php-src: Merge remote-tracking branch 'origin/master' into str_size_and_int64: ext/date/php_date.c

From: Date: Fri, 06 Jun 2014 07:06:48 +0000
Subject: com php-src: Merge remote-tracking branch 'origin/master' into str_size_and_int64: ext/date/php_date.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-78716@lists.php.net to get a copy of this message
Commit: 0e7bf92129f608c44f4d5bd51139ec2bd85fecc8 Author: Anatol Belski <ab@php.net> Fri, 6 Jun 2014 09:06:48 +0200 Parents: df0794469d321a3f8dc0e82ed6a0532e85cbd030 e16097626a7e86e0baa9fa7d17477b6ffc13c706 Branches: str_size_and_int64 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0e7bf92129f608c44f4d5bd51139ec2bd85fecc8 Log: 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 Bugs: https://bugs.php.net/87 Changed paths: MM ext/date/php_date.c Diff: diff --cc ext/date/php_date.c index f9dd31a,7009291..a78f766 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@@ -2717,8 -2730,10 +2717,10 @@@ PHP_METHOD(DateTime, __construct zend_error_handling error_handling; 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 (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); }

« previous php.cvs (#78716) next »