Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #64705 errorInfo property of PDOException is null when PDO::__construct() fails
This commit is contained in:
Nikita Popov 2020-08-11 17:13:00 +02:00
commit 981af26d7b
9 changed files with 86 additions and 6 deletions

View file

@ -96,8 +96,7 @@ int _pdo_pgsql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, int errcode, const char *
}
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 errcode;