diff options
author | Wez Furlong <wez@php.net> | 2005-01-17 05:28:46 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2005-01-17 05:28:46 +0000 |
commit | 3a751f37c661f05b93d949806e2f67a352e2ba73 (patch) | |
tree | 70365b3cca65c0febea3e92d385650c0be54856a /ext/pdo/php_pdo_int.h | |
parent | b234f1e415c3e2b010b2427280d89a442befb76d (diff) | |
download | php-git-3a751f37c661f05b93d949806e2f67a352e2ba73.tar.gz |
don't raise errors for the no-error case
Diffstat (limited to 'ext/pdo/php_pdo_int.h')
-rwxr-xr-x | ext/pdo/php_pdo_int.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pdo/php_pdo_int.h b/ext/pdo/php_pdo_int.h index 68cb8a33a4..48e0df1850 100755 --- a/ext/pdo/php_pdo_int.h +++ b/ext/pdo/php_pdo_int.h @@ -53,8 +53,8 @@ extern void pdo_handle_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt TSRMLS_DC); #define PDO_DBH_CLEAR_ERR() strcpy(dbh->error_code, PDO_ERR_NONE) #define PDO_STMT_CLEAR_ERR() strcpy(stmt->error_code, PDO_ERR_NONE) -#define PDO_HANDLE_DBH_ERR() if (dbh->error_code) { pdo_handle_error(dbh, NULL TSRMLS_CC); } -#define PDO_HANDLE_STMT_ERR() if (stmt->error_code) { pdo_handle_error(stmt->dbh, stmt TSRMLS_CC); } +#define PDO_HANDLE_DBH_ERR() if (strcmp(dbh->error_code, PDO_ERR_NONE)) { pdo_handle_error(dbh, NULL TSRMLS_CC); } +#define PDO_HANDLE_STMT_ERR() if (strcmp(stmt->error_code, PDO_ERR_NONE)) { pdo_handle_error(stmt->dbh, stmt TSRMLS_CC); } int pdo_sqlstate_init_error_table(void); void pdo_sqlstate_fini_error_table(void); |