Browse Source

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.
pull/1224/head
Nikita Popov 11 years ago
parent
commit
caf9219dea
  1. 4
      ext/pdo/pdo_dbh.c

4
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 */

Loading…
Cancel
Save