diff options
author | Wez Furlong <wez@php.net> | 2005-01-17 23:59:16 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2005-01-17 23:59:16 +0000 |
commit | 37ea5fbeb5101b16b6af28ae8aea2169bfb65a96 (patch) | |
tree | 0a49a474538038f7b4145ffa595ff2904ed85c6b | |
parent | 7c152b6a8e96e25d8a75a7b7a2ea5c3cad76af7a (diff) | |
download | php-git-37ea5fbeb5101b16b6af28ae8aea2169bfb65a96.tar.gz |
Tidy up driver specific method handling
-rwxr-xr-x | ext/pdo/pdo_dbh.c | 4 | ||||
-rwxr-xr-x | ext/pdo/pdo_stmt.c | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index 09c19191d1..4af32a5779 100755 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -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; } } diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 63c64fb5e1..ae8e4172aa 100755 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -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; |