mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Introduce php_pdo_stmt_valid_db_obj_handle() (#17567)
This commit is contained in:
parent
ad6cdb5aaa
commit
6f4579af85
7 changed files with 23 additions and 18 deletions
|
@ -122,9 +122,7 @@ static void pgsql_stmt_finish(pdo_pgsql_stmt *S, int fin_mode)
|
|||
static int pgsql_stmt_dtor(pdo_stmt_t *stmt)
|
||||
{
|
||||
pdo_pgsql_stmt *S = (pdo_pgsql_stmt*)stmt->driver_data;
|
||||
bool server_obj_usable = !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);
|
||||
bool server_obj_usable = php_pdo_stmt_valid_db_obj_handle(stmt);
|
||||
|
||||
pgsql_stmt_finish(S, FIN_DISCARD|(server_obj_usable ? FIN_CLOSE|FIN_ABORT : 0));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue