summaryrefslogtreecommitdiff
path: root/ext/pdo_sqlite/sqlite_driver.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-08-11 17:13:32 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-08-11 17:16:38 +0200
commit33028bf014270f94c9407725d9117fa9a5ecec02 (patch)
tree89ac43eaec7bf2fd8df00b8c1ef5079504ffa3b0 /ext/pdo_sqlite/sqlite_driver.c
parent8694eb14f437cedb0b1b48be95862272fb818aeb (diff)
parent981af26d7bc742a4cfe34b764a5f32f0e3fc776c (diff)
downloadphp-git-33028bf014270f94c9407725d9117fa9a5ecec02.tar.gz
Merge branch 'PHP-7.4'
* PHP-7.4: Fix #64705 errorInfo property of PDOException is null when PDO::__construct() fails
Diffstat (limited to 'ext/pdo_sqlite/sqlite_driver.c')
-rw-r--r--ext/pdo_sqlite/sqlite_driver.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c
index 090cb41c08..dcbc604739 100644
--- a/ext/pdo_sqlite/sqlite_driver.c
+++ b/ext/pdo_sqlite/sqlite_driver.c
@@ -75,8 +75,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(), einfo->errcode, "SQLSTATE[%s] [%d] %s",
- *pdo_err, einfo->errcode, einfo->errmsg);
+ pdo_throw_exception(einfo->errcode, einfo->errmsg, pdo_err);
}
return einfo->errcode;