File tree Expand file tree Collapse file tree 1 file changed +2
-31
lines changed Expand file tree Collapse file tree 1 file changed +2
-31
lines changed Original file line number Diff line number Diff line change @@ -4260,44 +4260,15 @@ ZEND_API void zend_replace_error_handling(zend_error_handling_t error_handling,
4260
4260
}
4261
4261
/* }}} */
4262
4262
4263
- static int same_zval (zval * zv1 , zval * zv2 ) /* {{{ */
4264
- {
4265
- if (Z_TYPE_P (zv1 ) != Z_TYPE_P (zv2 )) {
4266
- return 0 ;
4267
- }
4268
- switch (Z_TYPE_P (zv1 )) {
4269
- case IS_UNDEF :
4270
- case IS_NULL :
4271
- case IS_FALSE :
4272
- case IS_TRUE :
4273
- return 1 ;
4274
- case IS_LONG :
4275
- return Z_LVAL_P (zv1 ) == Z_LVAL_P (zv2 );
4276
- case IS_DOUBLE :
4277
- return Z_LVAL_P (zv1 ) == Z_LVAL_P (zv2 );
4278
- case IS_STRING :
4279
- case IS_ARRAY :
4280
- case IS_OBJECT :
4281
- case IS_RESOURCE :
4282
- return Z_COUNTED_P (zv1 ) == Z_COUNTED_P (zv2 );
4283
- default :
4284
- return 0 ;
4285
- }
4286
- }
4287
- /* }}} */
4288
-
4289
4263
ZEND_API void zend_restore_error_handling (zend_error_handling * saved ) /* {{{ */
4290
4264
{
4291
4265
EG (error_handling ) = saved -> handling ;
4292
4266
EG (exception_class ) = saved -> handling == EH_THROW ? saved -> exception : NULL ;
4293
- if (Z_TYPE (saved -> user_handler ) != IS_UNDEF
4294
- && !same_zval (& saved -> user_handler , & EG (user_error_handler ))) {
4267
+ if (Z_TYPE (saved -> user_handler ) != IS_UNDEF ) {
4295
4268
zval_ptr_dtor (& EG (user_error_handler ));
4296
4269
ZVAL_COPY_VALUE (& EG (user_error_handler ), & saved -> user_handler );
4297
- } else if (Z_TYPE (saved -> user_handler )) {
4298
- zval_ptr_dtor (& saved -> user_handler );
4270
+ ZVAL_UNDEF (& saved -> user_handler );
4299
4271
}
4300
- ZVAL_UNDEF (& saved -> user_handler );
4301
4272
}
4302
4273
/* }}} */
4303
4274
You can’t perform that action at this time.
0 commit comments