Skip to content

Commit c83954e

Browse files
committed
try something different and not populate info back to PDO
1 parent 7ef91de commit c83954e

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

ext/pdo_odbc/odbc_driver.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,13 @@ static void pdo_odbc_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *in
4141
einfo = &S->einfo;
4242
}
4343

44-
if (einfo->last_err_msg != NULL) {
45-
message = strpprintf(0, "%s (%s[%ld] at %s:%d)",
46-
einfo->last_err_msg,
47-
einfo->what, (long) einfo->last_error,
48-
einfo->file, einfo->line);
49-
} else {
50-
message = ZSTR_EMPTY_ALLOC();
44+
if (einfo->last_err_msg == NULL || strlen(einfo->last_err_msg) == 0) {
45+
return;
5146
}
52-
47+
message = strpprintf(0, "%s (%s[%ld] at %s:%d)",
48+
einfo->last_err_msg,
49+
einfo->what, (long) einfo->last_error,
50+
einfo->file, einfo->line);
5351
add_next_index_long(info, einfo->last_error);
5452
add_next_index_str(info, message);
5553
add_next_index_string(info, einfo->last_state);

0 commit comments

Comments
 (0)