@@ -568,9 +568,9 @@ ZEND_API zend_opt_long ZEND_FASTCALL zend_parse_arg_long_weak(const zval *arg, u
568
568
* zend_verify_weak_scalar_type_hint_no_sideeffect() */
569
569
if (arg_num != (uint32_t )-1 ) {
570
570
zend_incompatible_double_to_long_error (Z_DVAL_P (arg ));
571
- }
572
- if ( UNEXPECTED ( EG ( exception ))) {
573
- goto fail ;
571
+ if ( UNEXPECTED ( EG ( exception ))) {
572
+ goto fail ;
573
+ }
574
574
}
575
575
}
576
576
return (zend_opt_long ){lval , true};
@@ -596,17 +596,16 @@ ZEND_API zend_opt_long ZEND_FASTCALL zend_parse_arg_long_weak(const zval *arg, u
596
596
* zend_verify_weak_scalar_type_hint_no_sideeffect() */
597
597
if (arg_num != (uint32_t )-1 ) {
598
598
zend_incompatible_string_to_long_error (Z_STR_P (arg ));
599
- }
600
- if ( UNEXPECTED ( EG ( exception ))) {
601
- goto fail ;
599
+ if ( UNEXPECTED ( EG ( exception ))) {
600
+ goto fail ;
601
+ }
602
602
}
603
603
}
604
+ } else {
605
+ goto fail ;
604
606
}
605
- return (zend_opt_long ){lval , true};
606
- }
607
- if (UNEXPECTED (EG (exception ))) {
608
- goto fail ;
609
607
}
608
+ return (zend_opt_long ){lval , true};
610
609
} else if (EXPECTED (Z_TYPE_P (arg ) < IS_TRUE )) {
611
610
if (UNEXPECTED (Z_TYPE_P (arg ) == IS_NULL ) && !zend_null_arg_deprecated ("int" , arg_num )) {
612
611
goto fail ;
@@ -654,20 +653,13 @@ ZEND_API zend_opt_double ZEND_FASTCALL zend_parse_arg_double_weak(const zval *ar
654
653
double d ;
655
654
656
655
if (UNEXPECTED ((type = is_numeric_str_function (Z_STR_P (arg ), & l , & d )) != IS_DOUBLE )) {
657
- zend_opt_double result ;
658
656
if (EXPECTED (type != 0 )) {
659
- result .value = (double )(l );
660
- result .has_value = true;
661
- } else {
662
- result .has_value = false;
657
+ return (zend_opt_double ){(double )l , true};
663
658
}
664
- return result ;
659
+ goto fail ;
665
660
} else {
666
661
return (zend_opt_double ){d , true};
667
662
}
668
- if (UNEXPECTED (EG (exception ))) {
669
- goto fail ;
670
- }
671
663
} else if (EXPECTED (Z_TYPE_P (arg ) < IS_TRUE )) {
672
664
if (UNEXPECTED (Z_TYPE_P (arg ) == IS_NULL ) && !zend_null_arg_deprecated ("float" , arg_num )) {
673
665
goto fail ;
0 commit comments