Introduce php_pdo_stmt_valid_db_obj_handle() (#17567)

This commit is contained in:
Niels Dossche 2025-01-28 21:54:11 +01:00 committed by GitHub
parent ad6cdb5aaa
commit 6f4579af85
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 23 additions and 18 deletions

View file

@ -95,9 +95,7 @@ static int pdo_mysql_stmt_dtor(pdo_stmt_t *stmt) /* {{{ */
}
#endif
if (!S->done && !Z_ISUNDEF(stmt->database_object_handle)
&& IS_OBJ_VALID(EG(objects_store).object_buckets[Z_OBJ_HANDLE(stmt->database_object_handle)])
&& (!(OBJ_FLAGS(Z_OBJ(stmt->database_object_handle)) & IS_OBJ_FREE_CALLED))) {
if (!S->done && php_pdo_stmt_valid_db_obj_handle(stmt)) {
while (mysql_more_results(S->H->server)) {
MYSQL_RES *res;
if (mysql_next_result(S->H->server) != 0) {