File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -592,7 +592,18 @@ static void function_copy_ctor(zval *zv) /* {{{ */
592
592
new_arg_info = pemalloc (sizeof (zend_arg_info ) * num_args , 1 );
593
593
memcpy (new_arg_info , arg_info , sizeof (zend_arg_info ) * num_args );
594
594
for (i = 0 ; i < num_args ; i ++ ) {
595
- if (ZEND_TYPE_IS_CLASS (arg_info [i ].type )) {
595
+ if (ZEND_TYPE_HAS_LIST (arg_info [i ].type )) {
596
+ zend_type_list * old_list = ZEND_TYPE_LIST (arg_info [i ].type );
597
+ zend_type_list * new_list = pemalloc (ZEND_TYPE_LIST_SIZE (old_list -> num_types ), 1 );
598
+ memcpy (new_list , old_list , ZEND_TYPE_LIST_SIZE (old_list -> num_types ));
599
+ ZEND_TYPE_SET_PTR (new_arg_info [i ].type , new_list );
600
+
601
+ void * * entry ;
602
+ ZEND_TYPE_LIST_FOREACH_PTR (new_list , entry ) {
603
+ zend_string * name = zend_string_dup (ZEND_TYPE_LIST_GET_NAME (* entry ), 1 );
604
+ * entry = ZEND_TYPE_LIST_ENCODE_NAME (name );
605
+ } ZEND_TYPE_LIST_FOREACH_END ();
606
+ } else if (ZEND_TYPE_HAS_NAME (arg_info [i ].type )) {
596
607
zend_string * name = zend_string_dup (ZEND_TYPE_NAME (arg_info [i ].type ), 1 );
597
608
ZEND_TYPE_SET_PTR (new_arg_info [i ].type , name );
598
609
}
You can’t perform that action at this time.
0 commit comments