mirror of
https://github.com/php/php-src.git
synced 2024-12-02 22:34:55 +08:00
fix possible segv on failed connect
This commit is contained in:
parent
20eac88e58
commit
7d788aeba4
@ -274,6 +274,7 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
|
||||
|
||||
H = pecalloc(1, sizeof(pdo_mysql_db_handle), dbh->is_persistent);
|
||||
|
||||
dbh->methods = &mysql_methods;
|
||||
H->einfo.errcode = 0;
|
||||
H->einfo.errmsg = NULL;
|
||||
|
||||
@ -308,7 +309,6 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
|
||||
|
||||
H->attached = 1;
|
||||
|
||||
dbh->methods = &mysql_methods;
|
||||
dbh->alloc_own_columns = 1;
|
||||
dbh->supports_placeholders = 0;
|
||||
dbh->max_escaped_char_length = 2;
|
||||
|
Loading…
Reference in New Issue
Block a user