diff options
| -rw-r--r-- | ext/pdo/pdo_dbh.c | 2 | ||||
| -rw-r--r-- | ext/pdo/pdo_stmt.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index a847ae5103..9029e4a8ea 100644 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -1114,6 +1114,8 @@ static PHP_METHOD(PDO, query) /* something broke */ dbh->query_stmt = stmt; ZVAL_COPY_VALUE(&dbh->query_stmt_zval, return_value); + Z_DELREF(stmt->database_object_handle); + ZVAL_UNDEF(&stmt->database_object_handle); PDO_HANDLE_STMT_ERR(); } else { PDO_HANDLE_DBH_ERR(); diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 15e489a0bd..3c09609fc6 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -803,7 +803,7 @@ static int do_fetch_func_prepare(pdo_stmt_t *stmt) /* {{{ */ } /* }}} */ -static int do_fetch_opt_finish(pdo_stmt_t *stmt, int free_ctor_agrs) /* {{{ */ +static void do_fetch_opt_finish(pdo_stmt_t *stmt, int free_ctor_agrs) /* {{{ */ { /* fci.size is used to check if it is valid */ if (stmt->fetch.cls.fci.size && stmt->fetch.cls.fci.params) { @@ -826,7 +826,6 @@ static int do_fetch_opt_finish(pdo_stmt_t *stmt, int free_ctor_agrs) /* {{{ */ efree(stmt->fetch.func.values); stmt->fetch.func.values = NULL; } - return 1; } /* }}} */ |
