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/php_pdo_driver.h | |
parent | 60a61afd3c40f029c6bb679754d13f71d63e3283 (diff) | |
download | php-git-1a58611ae54fba45f7cf6b16ef921f7ad6c3d4b9.tar.gz |
Voidify PDO's fetch_error handler
Diffstat (limited to 'ext/pdo/php_pdo_driver.h')
-rw-r--r-- | ext/pdo/php_pdo_driver.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/ext/pdo/php_pdo_driver.h b/ext/pdo/php_pdo_driver.h index a0e85b589e..c6bdf49f8e 100644 --- a/ext/pdo/php_pdo_driver.h +++ b/ext/pdo/php_pdo_driver.h @@ -250,13 +250,16 @@ typedef bool (*pdo_dbh_set_attr_func)(pdo_dbh_t *dbh, zend_long attr, zval *val) * MUST be an emalloc'd NULL terminated string. */ typedef char *(*pdo_dbh_last_id_func)(pdo_dbh_t *dbh, const char *name, size_t *len); -/* fetch error information. if stmt is not null, fetch information pertaining - * to the statement, otherwise fetch global error information. The driver - * should add the following information to the array "info" in this order: +/* Fetch error information. + * If stmt is not null, fetch information pertaining to the statement, + * otherwise fetch global error information. + * info is an initialized PHP array, if there are no messages leave it empty. + * The driver should add the following information to the array "info" in this order: * - native error code * - string representation of the error code ... any other optional driver - * specific data ... */ -typedef int (*pdo_dbh_fetch_error_func)(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *info); + * specific data ... + * PDO takes care of normalizing the array. */ +typedef void (*pdo_dbh_fetch_error_func)(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *info); /* fetching of attributes * There are 3 return states: |