diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-10-28 11:58:07 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-10-28 12:18:02 +0100 |
commit | 68dcaa29d8a2d51f0fed5fde9f3543a1338bfe44 (patch) | |
tree | 21d33ac6e34583436d5c39ce03f27df919883c16 /ext/pdo | |
parent | 68f80be9d1380de731930187250a7ed6b55ae196 (diff) | |
download | php-git-68dcaa29d8a2d51f0fed5fde9f3543a1338bfe44.tar.gz |
Fixed bug #66528
Report errors in commit, rollback and autocommit handlers.
Diffstat (limited to 'ext/pdo')
-rw-r--r-- | ext/pdo/pdo_dbh.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index 1396816fe9..3067fcbf41 100644 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -829,9 +829,7 @@ static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value) /* } fail: - if (attr == PDO_ATTR_AUTOCOMMIT) { - zend_throw_exception_ex(php_pdo_get_exception(), 0, "The auto-commit mode cannot be changed for this driver"); - } else if (!dbh->methods->set_attribute) { + if (!dbh->methods->set_attribute) { pdo_raise_impl_error(dbh, NULL, "IM001", "driver does not support setting attributes"); } else { PDO_HANDLE_DBH_ERR(); |