summaryrefslogtreecommitdiff
path: root/ext/date/php_date.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2012-10-17 17:23:37 +0200
committerAndrey Hristov <andrey@php.net>2012-10-17 17:23:37 +0200
commit7314ed535f93841ff2d2bca5e65afcb0f2b003bb (patch)
treebceec620f2cb1d5f255196e00ae7ea1187b41fe2 /ext/date/php_date.c
parentc50d732f7686352381d44926988aca194204433d (diff)
parentda541ff561e0ac6ac72d2efd8b785ecfeef868dc (diff)
downloadphp-git-7314ed535f93841ff2d2bca5e65afcb0f2b003bb.tar.gz
Merge branch 'PHP-5.3' of ssh://git.php.net/php-src into PHP-5.3
Diffstat (limited to 'ext/date/php_date.c')
-rw-r--r--ext/date/php_date.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index d9e6a289b4..e8a457052e 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -2544,9 +2544,6 @@ static int php_date_initialize_from_hash(zval **return_value, php_date_obj **dat
if (zend_hash_find(myht, "timezone_type", 14, (void**) &z_timezone_type) == SUCCESS) {
convert_to_long(*z_timezone_type);
if (zend_hash_find(myht, "timezone", 9, (void**) &z_timezone) == SUCCESS) {
- zend_error_handling error_handling;
-
- zend_replace_error_handling(EH_THROW, NULL, &error_handling TSRMLS_CC);
convert_to_string(*z_timezone);
switch (Z_LVAL_PP(z_timezone_type)) {
@@ -2554,9 +2551,9 @@ static int php_date_initialize_from_hash(zval **return_value, php_date_obj **dat
case TIMELIB_ZONETYPE_ABBR: {
char *tmp = emalloc(Z_STRLEN_PP(z_date) + Z_STRLEN_PP(z_timezone) + 2);
snprintf(tmp, Z_STRLEN_PP(z_date) + Z_STRLEN_PP(z_timezone) + 2, "%s %s", Z_STRVAL_PP(z_date), Z_STRVAL_PP(z_timezone));
- php_date_initialize(*dateobj, tmp, Z_STRLEN_PP(z_date) + Z_STRLEN_PP(z_timezone) + 1, NULL, NULL, 1 TSRMLS_CC);
+ php_date_initialize(*dateobj, tmp, Z_STRLEN_PP(z_date) + Z_STRLEN_PP(z_timezone) + 1, NULL, NULL, 0 TSRMLS_CC);
efree(tmp);
- break;
+ return 1;
}
case TIMELIB_ZONETYPE_ID:
@@ -2570,15 +2567,10 @@ static int php_date_initialize_from_hash(zval **return_value, php_date_obj **dat
tzobj->tzi.tz = tzi;
tzobj->initialized = 1;
- php_date_initialize(*dateobj, Z_STRVAL_PP(z_date), Z_STRLEN_PP(z_date), NULL, tmp_obj, 1 TSRMLS_CC);
+ php_date_initialize(*dateobj, Z_STRVAL_PP(z_date), Z_STRLEN_PP(z_date), NULL, tmp_obj, 0 TSRMLS_CC);
zval_ptr_dtor(&tmp_obj);
- break;
- default:
- zend_restore_error_handling(&error_handling TSRMLS_CC);
- return 0;
+ return 1;
}
- zend_restore_error_handling(&error_handling TSRMLS_CC);
- return 1;
}
}
}