diff options
author | Nikita Popov <nikic@php.net> | 2015-04-06 12:15:04 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2015-04-06 12:15:04 +0200 |
commit | caf9219dea58dcc6ef6da2b3b86a1e9808363bff (patch) | |
tree | 7c3a569ef2fc37828fb12acd8368a0d496f84eb7 /ext/pdo/pdo_dbh.c | |
parent | 122d759618a42bff105971b923fbbb5be02e34b9 (diff) | |
download | php-git-caf9219dea58dcc6ef6da2b3b86a1e9808363bff.tar.gz |
Fix EH_THROW replacement in PDO constructor
Needs to happen for the "goto options" case as well, otherwise
will try to restore error handling that was never replaced.
Diffstat (limited to 'ext/pdo/pdo_dbh.c')
-rw-r--r-- | ext/pdo/pdo_dbh.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index f3df485404..a847ae5103 100644 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -345,13 +345,13 @@ static PHP_METHOD(PDO, dbh_constructor) php_error_docref(NULL, E_ERROR, "out of memory"); } + zend_replace_error_handling(EH_THROW, pdo_exception_ce, &zeh); + if (!call_factory) { /* we got a persistent guy from our cache */ goto options; } - zend_replace_error_handling(EH_THROW, pdo_exception_ce, &zeh); - if (driver->db_handle_factory(dbh, options)) { /* all set */ |