Skip to content

Commit 3402985

Browse files
committed
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4: ext/pdo_odbc: Fall back when SQLDescribeParam returns SQL_UNKNOWN_TYPE (#25569)
2 parents f5d03ff + 3bacf3f commit 3402985

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎ext/pdo_odbc/odbc_stmt.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,10 @@ static int odbc_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *p
385385
}
386386

387387
rc = SQLDescribeParam(S->stmt, (SQLUSMALLINT) param->paramno+1, &sqltype, &precision, &scale, &nullable);
388-
if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) {
388+
if (
389+
(rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO)
390+
|| sqltype == SQL_UNKNOWN_TYPE
391+
) {
389392
/* MS Access, for instance, doesn't support SQLDescribeParam,
390393
* so we need to guess */
391394
switch (PDO_PARAM_TYPE(param->param_type)) {

0 commit comments

Comments
 (0)