From 5023a7c61c7584ec7f976550f45e661c27ee3f7e Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Thu, 20 May 2004 19:16:49 +0000 Subject: Enable setting the different error modes via PDO::setAttribute() --- ext/pdo/php_pdo_int.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/pdo/php_pdo_int.h') diff --git a/ext/pdo/php_pdo_int.h b/ext/pdo/php_pdo_int.h index 2915ee2017..2c3b73de31 100755 --- a/ext/pdo/php_pdo_int.h +++ b/ext/pdo/php_pdo_int.h @@ -40,8 +40,8 @@ extern void pdo_handle_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt TSRMLS_DC); #define PDO_DBH_CLEAR_ERR() dbh->error_code = PDO_ERR_NONE #define PDO_STMT_CLEAR_ERR() stmt->error_code = PDO_ERR_NONE -#define PDO_HANDLE_DBH_ERR() pdo_handle_error(dbh, NULL TSRMLS_CC) -#define PDO_HANDLE_STMT_ERR() pdo_handle_error(stmt->dbh, stmt TSRMLS_CC) +#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); } /* -- cgit v1.2.1