From d2e14e3f202d1c30dd79c095ff27bf96a146b813 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Tue, 12 Jan 2010 12:46:54 +0000 Subject: Fixed bug #50728 (All PDOExceptions hardcode 'code' property to 0) --- ext/pdo_mysql/mysql_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/pdo_mysql') diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index 04ee08174c..2f6a9be99c 100755 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -127,7 +127,7 @@ int _pdo_mysql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int lin if (!dbh->methods) { PDO_DBG_INF("Throwing exception"); - zend_throw_exception_ex(php_pdo_get_exception(), 0 TSRMLS_CC, "SQLSTATE[%s] [%d] %s", + zend_throw_exception_ex(php_pdo_get_exception(), einfo->errcode TSRMLS_CC, "SQLSTATE[%s] [%d] %s", *pdo_err, einfo->errcode, einfo->errmsg); } -- cgit v1.2.1