@@ -6238,26 +6238,26 @@ static void _php_db2_bind_fetch_helper(INTERNAL_FUNCTION_PARAMETERS, int op)
62386238 case SQL_NUMERIC :
62396239 case SQL_DECFLOAT :
62406240#ifdef PASE /* i5/OS trim spaces */
6241- if (stmt_res -> s_i5_conn_parent -> c_i5_char_trim > 0 ) {
6242- i5trim = strlen ((char * )row_data -> str_val );
6243- for (; i5trim ; i5trim -- ) {
6244- i5char = (char )(((char * )row_data -> str_val )[i5trim ]);
6245- if (i5char == 0x00 || i5char == 0x20 ) {
6246- continue ;
6247- }
6248- i5trim ++ ;
6249- break ;
6250- }
6251- if ( op & DB2_FETCH_ASSOC ) {
6252- add_assoc_stringl (return_value , (char * )stmt_res -> column_info [i ].name ,
6253- (char * )row_data -> str_val , i5trim );
6254- }
6255- if ( op & DB2_FETCH_INDEX ) {
6256- add_index_stringl (return_value , i , (char * )row_data -> str_val ,
6257- i5trim );
6258- }
6259- break ;
6260- }
6241+ if (stmt_res -> s_i5_conn_parent -> c_i5_char_trim > 0 ) {
6242+ i5trim = strlen ((char * )row_data -> str_val );
6243+ for (; i5trim >= 0 ; i5trim -- ) {
6244+ i5char = (char )(((char * )row_data -> str_val )[i5trim ]);
6245+ if (i5char == 0x00 || i5char == 0x20 ) {
6246+ continue ;
6247+ }
6248+ i5trim ++ ;
6249+ break ;
6250+ }
6251+ if ( op & DB2_FETCH_ASSOC ) {
6252+ add_assoc_stringl (return_value , (char * )stmt_res -> column_info [i ].name ,
6253+ (char * )row_data -> str_val , i5trim );
6254+ }
6255+ if ( op & DB2_FETCH_INDEX ) {
6256+ add_index_stringl (return_value , i , (char * )row_data -> str_val ,
6257+ i5trim );
6258+ }
6259+ break ;
6260+ }
62616261#endif /* PASE */
62626262 if ( op & DB2_FETCH_ASSOC ) {
62636263 add_assoc_stringl (return_value , (char * )stmt_res -> column_info [i ].name ,
0 commit comments