Skip to content

Commit

Permalink
try something different and not populate info back to PDO
Browse files Browse the repository at this point in the history
  • Loading branch information
Girgias committed Jan 15, 2025
1 parent 7ef91de commit c83954e
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions ext/pdo_odbc/odbc_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,13 @@ static void pdo_odbc_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *in
einfo = &S->einfo;
}

if (einfo->last_err_msg != NULL) {
message = strpprintf(0, "%s (%s[%ld] at %s:%d)",
einfo->last_err_msg,
einfo->what, (long) einfo->last_error,
einfo->file, einfo->line);
} else {
message = ZSTR_EMPTY_ALLOC();
if (einfo->last_err_msg == NULL || strlen(einfo->last_err_msg) == 0) {
return;
}

message = strpprintf(0, "%s (%s[%ld] at %s:%d)",
einfo->last_err_msg,
einfo->what, (long) einfo->last_error,
einfo->file, einfo->line);
add_next_index_long(info, einfo->last_error);
add_next_index_str(info, message);
add_next_index_string(info, einfo->last_state);
Expand Down

0 comments on commit c83954e

Please sign in to comment.