Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 942283
Collapse All | Expand All

(-)php-8.1.30-orig/ext/pdo_odbc/odbc_driver.c (-2 / +2 lines)
Lines 83-89 void pdo_odbc_error(pdo_dbh_t *dbh, pdo_ Link Here
83
		eh = H->env;
83
		eh = H->env;
84
	}
84
	}
85
85
86
	rc = SQLGetDiagRec(htype, eh, recno++, (SQLCHAR *) einfo->last_state, &einfo->last_error,
86
	rc = SQLGetDiagRec(htype, eh, recno++, (SQLCHAR *) einfo->last_state, (SQLINTEGER *) &einfo->last_error,
87
			(SQLCHAR *) einfo->last_err_msg, sizeof(einfo->last_err_msg)-1, &errmsgsize);
87
			(SQLCHAR *) einfo->last_err_msg, sizeof(einfo->last_err_msg)-1, &errmsgsize);
88
88
89
	if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) {
89
	if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) {
Lines 98-104 void pdo_odbc_error(pdo_dbh_t *dbh, pdo_ Link Here
98
	strcpy(*pdo_err, einfo->last_state);
98
	strcpy(*pdo_err, einfo->last_state);
99
/* printf("@@ SQLSTATE[%s] %s\n", *pdo_err, einfo->last_err_msg); */
99
/* printf("@@ SQLSTATE[%s] %s\n", *pdo_err, einfo->last_err_msg); */
100
	if (!dbh->methods) {
100
	if (!dbh->methods) {
101
		zend_throw_exception_ex(php_pdo_get_exception(), einfo->last_error, "SQLSTATE[%s] %s: %d %s",
101
		zend_throw_exception_ex(php_pdo_get_exception(), einfo->last_error, "SQLSTATE[%s] %s: %ld %s",
102
				*pdo_err, what, einfo->last_error, einfo->last_err_msg);
102
				*pdo_err, what, einfo->last_error, einfo->last_err_msg);
103
	}
103
	}
104
104

Return to bug 942283