summaryrefslogtreecommitdiff
path: root/ext/odbc
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2020-09-29 11:03:52 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2020-09-29 11:04:09 +0200
commite08f69194c2b3e500549e5fbec631a22950ed186 (patch)
tree6d7585c4959ad3d097e7042ef84b30409e4dbea0 /ext/odbc
parent1fafcd2b282fabbae8a85de94b78e29f65635033 (diff)
parentdf5efa2fcdbcc9f6dea792caa149897060b350f7 (diff)
downloadphp-git-e08f69194c2b3e500549e5fbec631a22950ed186.tar.gz
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Fix #80150: Failure to fetch error message
Diffstat (limited to 'ext/odbc')
-rw-r--r--ext/odbc/php_odbc.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c
index 938601e2a6..1f6fd3ad73 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -3155,7 +3155,7 @@ PHP_FUNCTION(odbc_tables)
type, SAFE_SQL_NTS(type));
if (rc == SQL_ERROR) {
- odbc_sql_error(conn, SQL_NULL_HSTMT, "SQLTables");
+ odbc_sql_error(conn, result->stmt, "SQLTables");
efree(result);
RETURN_FALSE;
}
@@ -3226,7 +3226,7 @@ PHP_FUNCTION(odbc_columns)
column, (SQLSMALLINT) column_len);
if (rc == SQL_ERROR) {
- odbc_sql_error(conn, SQL_NULL_HSTMT, "SQLColumns");
+ odbc_sql_error(conn, result->stmt, "SQLColumns");
efree(result);
RETURN_FALSE;
}
@@ -3291,7 +3291,7 @@ PHP_FUNCTION(odbc_columnprivileges)
column, SAFE_SQL_NTS(column));
if (rc == SQL_ERROR) {
- odbc_sql_error(conn, SQL_NULL_HSTMT, "SQLColumnPrivileges");
+ odbc_sql_error(conn, result->stmt, "SQLColumnPrivileges");
efree(result);
RETURN_FALSE;
}
@@ -3371,7 +3371,7 @@ PHP_FUNCTION(odbc_foreignkeys)
ftable, SAFE_SQL_NTS(ftable) );
if (rc == SQL_ERROR) {
- odbc_sql_error(conn, SQL_NULL_HSTMT, "SQLForeignKeys");
+ odbc_sql_error(conn, result->stmt, "SQLForeignKeys");
efree(result);
RETURN_FALSE;
}
@@ -3433,7 +3433,7 @@ PHP_FUNCTION(odbc_gettypeinfo)
rc = SQLGetTypeInfo(result->stmt, data_type );
if (rc == SQL_ERROR) {
- odbc_sql_error(conn, SQL_NULL_HSTMT, "SQLGetTypeInfo");
+ odbc_sql_error(conn, result->stmt, "SQLGetTypeInfo");
efree(result);
RETURN_FALSE;
}
@@ -3495,7 +3495,7 @@ PHP_FUNCTION(odbc_primarykeys)
table, SAFE_SQL_NTS(table) );
if (rc == SQL_ERROR) {
- odbc_sql_error(conn, SQL_NULL_HSTMT, "SQLPrimaryKeys");
+ odbc_sql_error(conn, result->stmt, "SQLPrimaryKeys");
efree(result);
RETURN_FALSE;
}
@@ -3564,7 +3564,7 @@ PHP_FUNCTION(odbc_procedurecolumns)
col, SAFE_SQL_NTS(col) );
if (rc == SQL_ERROR) {
- odbc_sql_error(conn, SQL_NULL_HSTMT, "SQLProcedureColumns");
+ odbc_sql_error(conn, result->stmt, "SQLProcedureColumns");
efree(result);
RETURN_FALSE;
}
@@ -3632,7 +3632,7 @@ PHP_FUNCTION(odbc_procedures)
proc, SAFE_SQL_NTS(proc) );
if (rc == SQL_ERROR) {
- odbc_sql_error(conn, SQL_NULL_HSTMT, "SQLProcedures");
+ odbc_sql_error(conn, result->stmt, "SQLProcedures");
efree(result);
RETURN_FALSE;
}
@@ -3705,7 +3705,7 @@ PHP_FUNCTION(odbc_specialcolumns)
nullable);
if (rc == SQL_ERROR) {
- odbc_sql_error(conn, SQL_NULL_HSTMT, "SQLSpecialColumns");
+ odbc_sql_error(conn, result->stmt, "SQLSpecialColumns");
efree(result);
RETURN_FALSE;
}
@@ -3775,7 +3775,7 @@ PHP_FUNCTION(odbc_statistics)
reserved);
if (rc == SQL_ERROR) {
- odbc_sql_error(conn, SQL_NULL_HSTMT, "SQLStatistics");
+ odbc_sql_error(conn, result->stmt, "SQLStatistics");
efree(result);
RETURN_FALSE;
}
@@ -3838,7 +3838,7 @@ PHP_FUNCTION(odbc_tableprivileges)
table, SAFE_SQL_NTS(table));
if (rc == SQL_ERROR) {
- odbc_sql_error(conn, SQL_NULL_HSTMT, "SQLTablePrivileges");
+ odbc_sql_error(conn, result->stmt, "SQLTablePrivileges");
efree(result);
RETURN_FALSE;
}