mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
Tidy up driver specific method handling
This commit is contained in:
parent
7c152b6a8e
commit
37ea5fbeb5
2 changed files with 7 additions and 3 deletions
|
@ -839,7 +839,9 @@ static union _zend_function *dbh_method_get(
|
|||
/* not a pre-defined method, nor a user-defined method; check
|
||||
* the driver specific methods */
|
||||
if (!dbh->cls_methods[PDO_DBH_DRIVER_METHOD_KIND_DBH]) {
|
||||
if (!pdo_hash_methods(dbh, PDO_DBH_DRIVER_METHOD_KIND_DBH TSRMLS_CC)) {
|
||||
if (!pdo_hash_methods(dbh,
|
||||
PDO_DBH_DRIVER_METHOD_KIND_DBH TSRMLS_CC)
|
||||
|| !dbh->cls_methods[PDO_DBH_DRIVER_METHOD_KIND_DBH]) {
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1060,12 +1060,14 @@ static union _zend_function *dbstmt_method_get(
|
|||
/* not a pre-defined method, nor a user-defined method; check
|
||||
* the driver specific methods */
|
||||
if (!stmt->dbh->cls_methods[PDO_DBH_DRIVER_METHOD_KIND_STMT]) {
|
||||
if (!pdo_hash_methods(stmt->dbh, PDO_DBH_DRIVER_METHOD_KIND_STMT TSRMLS_CC)) {
|
||||
if (!pdo_hash_methods(stmt->dbh,
|
||||
PDO_DBH_DRIVER_METHOD_KIND_STMT TSRMLS_CC)
|
||||
|| !stmt->dbh->cls_methods[PDO_DBH_DRIVER_METHOD_KIND_STMT]) {
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
if (zend_hash_find(stmt->dbh->cls_methods[PDO_DBH_DRIVER_METHOD_KIND_DBH],
|
||||
if (zend_hash_find(stmt->dbh->cls_methods[PDO_DBH_DRIVER_METHOD_KIND_STMT],
|
||||
lc_method_name, method_len+1, (void**)&fbc) == FAILURE) {
|
||||
fbc = NULL;
|
||||
goto out;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue