File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -3040,14 +3040,16 @@ ZEND_METHOD(reflection_type, __toString)
30403040 if (param -> arg_info -> type_hint == IS_OBJECT
30413041 && !zend_string_equals_literal_ci (param -> arg_info -> class_name , "self" )
30423042 && !zend_string_equals_literal_ci (param -> arg_info -> class_name , "parent" )) {
3043- str = zend_string_extend (str , ZSTR_LEN (str ) + 1 , 0 );
3044- memmove (ZSTR_VAL (str ) + 1 , ZSTR_VAL (str ), ZSTR_LEN (str ) + 1 );
3043+ size_t orig_len = ZSTR_LEN (str );
3044+ str = zend_string_extend (str , orig_len + 1 , 0 );
3045+ memmove (ZSTR_VAL (str ) + 1 , ZSTR_VAL (str ), orig_len + 1 );
30453046 ZSTR_VAL (str )[0 ] = '\\' ;
30463047 }
30473048
30483049 if (param -> arg_info -> allow_null ) {
3049- str = zend_string_extend (str , ZSTR_LEN (str ) + 1 , 0 );
3050- memmove (ZSTR_VAL (str ) + 1 , ZSTR_VAL (str ), ZSTR_LEN (str ) + 1 );
3050+ size_t orig_len = ZSTR_LEN (str );
3051+ str = zend_string_extend (str , orig_len + 1 , 0 );
3052+ memmove (ZSTR_VAL (str ) + 1 , ZSTR_VAL (str ), orig_len + 1 );
30513053 ZSTR_VAL (str )[0 ] = '?' ;
30523054 }
30533055
You can’t perform that action at this time.
0 commit comments