diff options
-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; |