@@ -2784,17 +2784,13 @@ ZEND_API zend_result zend_register_functions(zend_class_entry *scope, const zend
2784
2784
num_args ++ ;
2785
2785
}
2786
2786
2787
- bool rebuild_arginfo = false;
2788
2787
/* If types of arguments have to be checked */
2789
2788
if (reg_function -> common .arg_info && num_args ) {
2790
2789
uint32_t i ;
2791
2790
for (i = 0 ; i < num_args ; i ++ ) {
2792
2791
zend_internal_arg_info * arg_info = & reg_function -> internal_function .arg_info [i ];
2793
2792
ZEND_ASSERT (arg_info -> name && "Parameter must have a name" );
2794
2793
if (ZEND_TYPE_IS_SET (arg_info -> type )) {
2795
- if (ZEND_TYPE_IS_ITERABLE_FALLBACK (arg_info -> type )) {
2796
- rebuild_arginfo = true;
2797
- }
2798
2794
reg_function -> common .fn_flags |= ZEND_ACC_HAS_TYPE_HINTS ;
2799
2795
}
2800
2796
#if ZEND_DEBUG
@@ -2809,14 +2805,11 @@ ZEND_API zend_result zend_register_functions(zend_class_entry *scope, const zend
2809
2805
}
2810
2806
}
2811
2807
2808
+ /* Rebuild arginfos if parameter/property types and/or a return type are used */
2812
2809
if (reg_function -> common .arg_info &&
2813
2810
(reg_function -> common .fn_flags & (ZEND_ACC_HAS_RETURN_TYPE |ZEND_ACC_HAS_TYPE_HINTS ))) {
2814
2811
/* Treat return type as an extra argument */
2815
2812
num_args ++ ;
2816
- rebuild_arginfo = true;
2817
- }
2818
-
2819
- if (rebuild_arginfo ) {
2820
2813
/* convert "const char*" class type names into "zend_string*" */
2821
2814
uint32_t i ;
2822
2815
zend_arg_info * arg_info = reg_function -> common .arg_info - 1 ;
@@ -2865,7 +2858,7 @@ ZEND_API zend_result zend_register_functions(zend_class_entry *scope, const zend
2865
2858
}
2866
2859
}
2867
2860
if (ZEND_TYPE_IS_ITERABLE_FALLBACK (new_arg_info [i ].type )) {
2868
- /* Do not warn?
2861
+ /* Warning generated an extension load warning which is emitted for every test
2869
2862
zend_error(E_CORE_WARNING, "iterable type is now a compile time alias for array|Traversable,"
2870
2863
" regenerate the argument info via the php-src gen_stub build script");
2871
2864
*/
0 commit comments