Skip to content

Commit 4fa9ae3

Browse files
committed
[IBMi] Use buffer's real length for pconnect check
The buffer is an unknown state, but likely all zeroes. Using zero here would result in spurious messages in the job log.
1 parent 38a39e0 commit 4fa9ae3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ibm_db2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2386,7 +2386,7 @@ static int _php_db2_connect_helper( INTERNAL_FUNCTION_PARAMETERS, conn_handle **
23862386
}
23872387
/* bind col */
23882388
if (rc == SQL_SUCCESS) {
2389-
rc = SQLBindCol((SQLHSTMT)try_stmt_res->hstmt, 1, SQL_CHAR, try_date, strlen(try_date), &try_date_len);
2389+
rc = SQLBindCol((SQLHSTMT)try_stmt_res->hstmt, 1, SQL_CHAR, try_date, 32, &try_date_len);
23902390
}
23912391
/* fetch data */
23922392
if (rc == SQL_SUCCESS) {

0 commit comments

Comments
 (0)