@@ -6238,26 +6238,26 @@ static void _php_db2_bind_fetch_helper(INTERNAL_FUNCTION_PARAMETERS, int op)
6238
6238
case SQL_NUMERIC :
6239
6239
case SQL_DECFLOAT :
6240
6240
#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
+ }
6261
6261
#endif /* PASE */
6262
6262
if ( op & DB2_FETCH_ASSOC ) {
6263
6263
add_assoc_stringl (return_value , (char * )stmt_res -> column_info [i ].name ,
0 commit comments