com php-src: Fix EH_THROW replacement in PDO construc tor: ext/pdo/pdo_dbh.c

From: Date: Mon, 06 Apr 2015 10:15:04 +0000
Subject: com php-src: Fix EH_THROW replacement in PDO construc tor: ext/pdo/pdo_dbh.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-86098@lists.php.net to get a copy of this message
Commit: caf9219dea58dcc6ef6da2b3b86a1e9808363bff Author: Nikita Popov <nikic@php.net> Mon, 6 Apr 2015 12:15:04 +0200 Parents: 122d759618a42bff105971b923fbbb5be02e34b9 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=caf9219dea58dcc6ef6da2b3b86a1e9808363bff Log: 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. Changed paths: M ext/pdo/pdo_dbh.c Diff: diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index f3df485..a847ae5 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 */

« previous php.cvs (#86098) next »