diff options
Diffstat (limited to 'ext/date/php_date.c')
| -rw-r--r-- | ext/date/php_date.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c index ffa6116804..390dd5d590 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2519,11 +2519,11 @@ PHP_METHOD(DateTime, __construct) char *time_str = NULL; int time_str_len = 0; - php_set_error_handling(EH_THROW, NULL TSRMLS_CC); + + zend_replace_error_handling(EH_THROW, NULL, NULL TSRMLS_CC); if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sO", &time_str, &time_str_len, &timezone_object, date_ce_timezone)) { date_initialize(zend_object_store_get_object(getThis() TSRMLS_CC), time_str, time_str_len, NULL, timezone_object, 1 TSRMLS_CC); } - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } /* }}} */ @@ -3193,7 +3193,7 @@ PHP_METHOD(DateTimeZone, __construct) timelib_tzinfo *tzi = NULL; php_timezone_obj *tzobj; - php_set_error_handling(EH_THROW, NULL TSRMLS_CC); + zend_replace_error_handling(EH_THROW, NULL, NULL TSRMLS_CC); if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &tz, &tz_len)) { if (SUCCESS == timezone_initialize(&tzi, tz TSRMLS_CC)) { tzobj = zend_object_store_get_object(getThis() TSRMLS_CC); @@ -3204,7 +3204,6 @@ PHP_METHOD(DateTimeZone, __construct) ZVAL_NULL(getThis()); } } - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } /* }}} */ @@ -3537,7 +3536,7 @@ PHP_METHOD(DateInterval, __construct) php_interval_obj *diobj; timelib_rel_time *reltime; - php_set_error_handling(EH_THROW, NULL TSRMLS_CC); + zend_replace_error_handling(EH_THROW, NULL, NULL TSRMLS_CC); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &interval_string, &interval_string_length) == SUCCESS) { if (date_interval_initialize(&reltime, interval_string, interval_string_length TSRMLS_CC) == SUCCESS) { diobj = zend_object_store_get_object(getThis() TSRMLS_CC); @@ -3547,7 +3546,6 @@ PHP_METHOD(DateInterval, __construct) ZVAL_NULL(getThis()); } } - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } /* }}} */ @@ -3691,7 +3689,7 @@ PHP_METHOD(DatePeriod, __construct) int isostr_len = 0; timelib_time *clone; - php_set_error_handling(EH_THROW, NULL TSRMLS_CC); + zend_replace_error_handling(EH_THROW, NULL, NULL TSRMLS_CC); if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "OOl|l", &start, date_ce_date, &interval, date_ce_interval, &recurrences, &options) == FAILURE) { if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "OOO|l", &start, date_ce_date, &interval, date_ce_interval, &end, date_ce_date, &options) == FAILURE) { if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &isostr, &isostr_len, &options) == FAILURE) { @@ -3762,7 +3760,6 @@ PHP_METHOD(DatePeriod, __construct) dpobj->recurrences = recurrences + dpobj->include_start_date; dpobj->initialized = 1; - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); } /* }}} */ |
