File tree Expand file tree Collapse file tree 2 files changed +3
-13
lines changed Expand file tree Collapse file tree 2 files changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -344,7 +344,6 @@ typedef enum {
344
344
typedef struct {
345
345
zend_error_handling_t handling ;
346
346
zend_class_entry * exception ;
347
- zval user_handler ;
348
347
} zend_error_handling ;
349
348
350
349
ZEND_API void zend_save_error_handling (zend_error_handling * current );
Original file line number Diff line number Diff line change @@ -4277,33 +4277,24 @@ ZEND_API void zend_save_error_handling(zend_error_handling *current) /* {{{ */
4277
4277
{
4278
4278
current -> handling = EG (error_handling );
4279
4279
current -> exception = EG (exception_class );
4280
- ZVAL_COPY (& current -> user_handler , & EG (user_error_handler ));
4281
4280
}
4282
4281
/* }}} */
4283
4282
4284
4283
ZEND_API void zend_replace_error_handling (zend_error_handling_t error_handling , zend_class_entry * exception_class , zend_error_handling * current ) /* {{{ */
4285
4284
{
4286
4285
if (current ) {
4287
4286
zend_save_error_handling (current );
4288
- if (error_handling != EH_NORMAL && Z_TYPE (EG (user_error_handler )) != IS_UNDEF ) {
4289
- zval_ptr_dtor (& EG (user_error_handler ));
4290
- ZVAL_UNDEF (& EG (user_error_handler ));
4291
- }
4292
4287
}
4288
+ ZEND_ASSERT (error_handling == EH_THROW || exception_class == NULL );
4293
4289
EG (error_handling ) = error_handling ;
4294
- EG (exception_class ) = error_handling == EH_THROW ? exception_class : NULL ;
4290
+ EG (exception_class ) = exception_class ;
4295
4291
}
4296
4292
/* }}} */
4297
4293
4298
4294
ZEND_API void zend_restore_error_handling (zend_error_handling * saved ) /* {{{ */
4299
4295
{
4300
4296
EG (error_handling ) = saved -> handling ;
4301
- EG (exception_class ) = saved -> handling == EH_THROW ? saved -> exception : NULL ;
4302
- if (Z_TYPE (saved -> user_handler ) != IS_UNDEF ) {
4303
- zval_ptr_dtor (& EG (user_error_handler ));
4304
- ZVAL_COPY_VALUE (& EG (user_error_handler ), & saved -> user_handler );
4305
- ZVAL_UNDEF (& saved -> user_handler );
4306
- }
4297
+ EG (exception_class ) = saved -> exception ;
4307
4298
}
4308
4299
/* }}} */
4309
4300
You can’t perform that action at this time.
0 commit comments