@@ -4131,7 +4131,7 @@ PHP_METHOD(DatePeriod, __construct)
4131
4131
dpobj -> current = NULL ;
4132
4132
4133
4133
if (isostr ) {
4134
- zend_replace_error_handling (EH_THROW , NULL , & error_handling );
4134
+ zend_replace_error_handling (EH_THROW , zend_ce_value_error , & error_handling );
4135
4135
date_period_initialize (& (dpobj -> start ), & (dpobj -> end ), & (dpobj -> interval ), & recurrences , isostr , isostr_len );
4136
4136
zend_restore_error_handling (& error_handling );
4137
4137
if (EG (exception )) {
@@ -4140,19 +4140,19 @@ PHP_METHOD(DatePeriod, __construct)
4140
4140
4141
4141
if (dpobj -> start == NULL ) {
4142
4142
zend_string * func = get_active_function_or_method_name ();
4143
- zend_throw_error ( NULL , "%s(): Argument #1 must contain a start date, \"%s\" given" , ZSTR_VAL (func ), isostr );
4143
+ zend_value_error ( "%s(): Argument #1 must contain a start date, \"%s\" given" , ZSTR_VAL (func ), isostr );
4144
4144
zend_string_release (func );
4145
4145
RETURN_THROWS ();
4146
4146
}
4147
4147
if (dpobj -> interval == NULL ) {
4148
4148
zend_string * func = get_active_function_or_method_name ();
4149
- zend_throw_error ( NULL , "%s(): Argument #1 must contain an interval, \"%s\" given" , ZSTR_VAL (func ), isostr );
4149
+ zend_value_error ( "%s(): Argument #1 must contain an interval, \"%s\" given" , ZSTR_VAL (func ), isostr );
4150
4150
zend_string_release (func );
4151
4151
RETURN_THROWS ();
4152
4152
}
4153
4153
if (dpobj -> end == NULL && recurrences == 0 ) {
4154
4154
zend_string * func = get_active_function_or_method_name ();
4155
- zend_throw_error ( NULL , "%s(): Argument #1 must contain an end date or a recurrence count, \"%s\" given" , ZSTR_VAL (func ), isostr );
4155
+ zend_value_error ( "%s(): Argument #1 must contain an end date or a recurrence count, \"%s\" given" , ZSTR_VAL (func ), isostr );
4156
4156
zend_string_release (func );
4157
4157
RETURN_THROWS ();
4158
4158
}
@@ -4194,7 +4194,7 @@ PHP_METHOD(DatePeriod, __construct)
4194
4194
4195
4195
if (dpobj -> end == NULL && recurrences < 1 ) {
4196
4196
zend_string * func = get_active_function_or_method_name ();
4197
- zend_throw_error ( NULL , "%s(): Recurrence count must be greater than 0" , ZSTR_VAL (func ));
4197
+ zend_value_error ( "%s(): Recurrence count must be greater than 0" , ZSTR_VAL (func ));
4198
4198
zend_string_release (func );
4199
4199
RETURN_THROWS ();
4200
4200
}
0 commit comments