mirror of
https://github.com/php/php-src.git
synced 2024-09-23 02:47:26 +00:00
Throw exception during ctor
This commit is contained in:
parent
02884a08f5
commit
e6551f081d
@ -116,6 +116,11 @@ int _pdo_mysql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int lin
|
||||
break;
|
||||
}
|
||||
|
||||
if (!dbh->methods) {
|
||||
zend_throw_exception_ex(php_pdo_get_exception(), *pdo_err TSRMLS_CC, "[%d] %s",
|
||||
einfo->errcode, einfo->errmsg);
|
||||
}
|
||||
|
||||
return einfo->errcode;
|
||||
}
|
||||
/* }}} */
|
||||
|
Loading…
Reference in New Issue
Block a user