summaryrefslogtreecommitdiff
path: root/ext/pdo_sqlite/sqlite_driver.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2010-01-12 12:46:54 +0000
committerIlia Alshanetsky <iliaa@php.net>2010-01-12 12:46:54 +0000
commitc2ed5e6f9d04c09bbffb3b453bf54a940011126f (patch)
tree3e774eaee6f75e4ecded5a567df18de5b5f5961f /ext/pdo_sqlite/sqlite_driver.c
parentcf881fc0f523b00846580481f0cbbf68c326c3e6 (diff)
downloadphp-git-c2ed5e6f9d04c09bbffb3b453bf54a940011126f.tar.gz
Fixed bug #50728 (All PDOExceptions hardcode 'code' property to 0)
Diffstat (limited to 'ext/pdo_sqlite/sqlite_driver.c')
-rw-r--r--ext/pdo_sqlite/sqlite_driver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c
index 4a91569d46..f315d0aa9e 100644
--- a/ext/pdo_sqlite/sqlite_driver.c
+++ b/ext/pdo_sqlite/sqlite_driver.c
@@ -102,7 +102,7 @@ int _pdo_sqlite_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int li
}
if (!dbh->methods) {
- 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);
}