@@ -663,8 +663,7 @@ static void accel_copy_permanent_strings(zend_new_interned_string_func_t new_int
663
663
if (Z_FUNC (p -> val )-> common .function_name ) {
664
664
Z_FUNC (p -> val )-> common .function_name = new_interned_string (Z_FUNC (p -> val )-> common .function_name );
665
665
}
666
- if (Z_FUNC (p -> val )-> common .arg_info &&
667
- (Z_FUNC (p -> val )-> common .fn_flags & (ZEND_ACC_HAS_RETURN_TYPE |ZEND_ACC_HAS_TYPE_HINTS ))) {
666
+ if (Z_FUNC (p -> val )-> common .arg_info ) {
668
667
uint32_t i ;
669
668
uint32_t num_args = Z_FUNC (p -> val )-> common .num_args + 1 ;
670
669
zend_arg_info * arg_info = Z_FUNC (p -> val )-> common .arg_info - 1 ;
@@ -673,6 +672,12 @@ static void accel_copy_permanent_strings(zend_new_interned_string_func_t new_int
673
672
num_args ++ ;
674
673
}
675
674
for (i = 0 ; i < num_args ; i ++ ) {
675
+ if (i > 0 ) {
676
+ arg_info [i ].name = new_interned_string (arg_info [i ].name );
677
+ if (arg_info [i ].default_value ) {
678
+ arg_info [i ].default_value = new_interned_string (arg_info [i ].default_value );
679
+ }
680
+ }
676
681
accel_copy_permanent_list_types (new_interned_string , arg_info [i ].type );
677
682
}
678
683
}
@@ -714,6 +719,24 @@ static void accel_copy_permanent_strings(zend_new_interned_string_func_t new_int
714
719
if (Z_FUNC (q -> val )-> common .function_name ) {
715
720
Z_FUNC (q -> val )-> common .function_name = new_interned_string (Z_FUNC (q -> val )-> common .function_name );
716
721
}
722
+ if (Z_FUNC (q -> val )-> common .scope == ce ) {
723
+ uint32_t i ;
724
+ uint32_t num_args = Z_FUNC (q -> val )-> common .num_args + 1 ;
725
+ zend_arg_info * arg_info = Z_FUNC (q -> val )-> common .arg_info - 1 ;
726
+
727
+ if (Z_FUNC (q -> val )-> common .fn_flags & ZEND_ACC_VARIADIC ) {
728
+ num_args ++ ;
729
+ }
730
+ for (i = 0 ; i < num_args ; i ++ ) {
731
+ if (i > 0 ) {
732
+ arg_info [i ].name = new_interned_string (arg_info [i ].name );
733
+ if (arg_info [i ].default_value ) {
734
+ arg_info [i ].default_value = new_interned_string (arg_info [i ].default_value );
735
+ }
736
+ }
737
+ accel_copy_permanent_list_types (new_interned_string , arg_info [i ].type );
738
+ }
739
+ }
717
740
} ZEND_HASH_FOREACH_END ();
718
741
719
742
ZEND_HASH_MAP_FOREACH_BUCKET (& ce -> constants_table , q ) {
0 commit comments