summaryrefslogtreecommitdiff
path: root/ext/pdo_pgsql/php_pdo_pgsql_int.h
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-12-10 15:51:17 +0100
committerNikita Popov <nikita.ppv@gmail.com>2020-12-10 15:53:23 +0100
commit15b51a215ac08fa72aa6ea44755f7134710f9004 (patch)
tree3d0889e9df957283e4d4d785a68505243f73a3c9 /ext/pdo_pgsql/php_pdo_pgsql_int.h
parentdde5572937e8165abac5fbaa2c4fbb85d7e391b2 (diff)
downloadphp-git-15b51a215ac08fa72aa6ea44755f7134710f9004.tar.gz
Fixed bug #79131
When a driver reports an error during EVT_ALLOC (and some over EVTs), make sure we handle it as usual, i.e. warn or throw. This requires some adjustments in PDO PgSQL to stop manually doing this through an impl error. Unfortunately the PDO PgSQL error messages regress because of this, as they now include a completely arbitrary error code. There doesn't seem to be an ability to skip it right now.
Diffstat (limited to 'ext/pdo_pgsql/php_pdo_pgsql_int.h')
-rw-r--r--ext/pdo_pgsql/php_pdo_pgsql_int.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/pdo_pgsql/php_pdo_pgsql_int.h b/ext/pdo_pgsql/php_pdo_pgsql_int.h
index 07dfa8ce27..bc31c9cdee 100644
--- a/ext/pdo_pgsql/php_pdo_pgsql_int.h
+++ b/ext/pdo_pgsql/php_pdo_pgsql_int.h
@@ -79,7 +79,8 @@ extern int _pdo_pgsql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, int errcode, const
#define pdo_pgsql_error(d,e,z) _pdo_pgsql_error(d, NULL, e, z, NULL, __FILE__, __LINE__)
#define pdo_pgsql_error_msg(d,e,m) _pdo_pgsql_error(d, NULL, e, NULL, m, __FILE__, __LINE__)
#define pdo_pgsql_error_stmt(s,e,z) _pdo_pgsql_error(s->dbh, s, e, z, NULL, __FILE__, __LINE__)
-#define pdo_pgsql_error_stmt_msg(s,e,m) _pdo_pgsql_error(s->dbh, s, e, NULL, m, __FILE__, __LINE__)
+#define pdo_pgsql_error_stmt_msg(stmt, e, sqlstate, msg) \
+ _pdo_pgsql_error(stmt->dbh, stmt, e, sqlstate, msg, __FILE__, __LINE__)
extern const struct pdo_stmt_methods pgsql_stmt_methods;