diff options
author | George Peter Banyard <girgias@php.net> | 2020-12-24 01:45:58 +0100 |
---|---|---|
committer | George Peter Banyard <girgias@php.net> | 2021-01-06 10:20:57 +0000 |
commit | 1a58611ae54fba45f7cf6b16ef921f7ad6c3d4b9 (patch) | |
tree | 7f43d5acc1f98a3ce5bda868febb1ea268d854be /ext/pdo_pgsql | |
parent | 60a61afd3c40f029c6bb679754d13f71d63e3283 (diff) | |
download | php-git-1a58611ae54fba45f7cf6b16ef921f7ad6c3d4b9.tar.gz |
Voidify PDO's fetch_error handler
Diffstat (limited to 'ext/pdo_pgsql')
-rw-r--r-- | ext/pdo_pgsql/pgsql_driver.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c index 53751b28c7..c7f9d46f7f 100644 --- a/ext/pdo_pgsql/pgsql_driver.c +++ b/ext/pdo_pgsql/pgsql_driver.c @@ -107,7 +107,7 @@ static void _pdo_pgsql_notice(pdo_dbh_t *dbh, const char *message) /* {{{ */ } /* }}} */ -static int pdo_pgsql_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *info) /* {{{ */ +static void pdo_pgsql_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *info) /* {{{ */ { pdo_pgsql_db_handle *H = (pdo_pgsql_db_handle *)dbh->driver_data; pdo_pgsql_error_info *einfo = &H->einfo; @@ -115,13 +115,12 @@ static int pdo_pgsql_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *in if (einfo->errcode) { add_next_index_long(info, einfo->errcode); } else { + /* Add null to respect expected info array structure */ add_next_index_null(info); } if (einfo->errmsg) { add_next_index_string(info, einfo->errmsg); } - - return 1; } /* }}} */ |