diff options
| -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 4c10161013..e56406887d 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2001,7 +2001,7 @@ PHP_FUNCTION(date_timezone_set) php_date_obj *dateobj; php_timezone_obj *tzobj; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|O", &object, date_ce_date, &timezone_object, date_ce_timezone) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &object, date_ce_date, &timezone_object, date_ce_timezone) == FAILURE) { RETURN_FALSE; } dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC); @@ -2131,13 +2131,13 @@ PHP_METHOD(DateTimeZone, __construct) int tz_len; timelib_tzinfo *tzi = NULL; + php_set_error_handling(EH_THROW, NULL TSRMLS_CC); if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &tz, &tz_len)) { - php_set_error_handling(EH_THROW, NULL TSRMLS_CC); if (SUCCESS == timezone_initialize(&tzi, tz TSRMLS_CC)) { ((php_timezone_obj *) zend_object_store_get_object(getThis() TSRMLS_CC))->tz = tzi; } - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } + php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } PHP_FUNCTION(timezone_name_get) |
