mirror of
https://github.com/php/php-src.git
synced 2024-12-14 12:26:19 +08:00
fix test 5 to pass
This commit is contained in:
parent
0c7cfcda4f
commit
f7d5d1036c
@ -478,19 +478,23 @@ static void _php_ibase_free_trans(zend_rsrc_list_entry *rsrc TSRMLS_DC)
|
||||
{
|
||||
ibase_tr_link *ib_trans = (ibase_tr_link *)rsrc->ptr;
|
||||
ibase_db_link *ib_link;
|
||||
int type;
|
||||
void *ptr;
|
||||
|
||||
ib_link = (ibase_db_link *) zend_fetch_resource(NULL TSRMLS_CC, ib_trans->link_rsrc, "InterBase link", NULL, 2, le_link, le_plink);
|
||||
ptr = zend_list_find(ib_trans->link_rsrc, &type); /* check if the link is still there */
|
||||
if (ptr && (type==le_link || type==le_plink)) {
|
||||
ib_link = (ibase_db_link *) zend_fetch_resource(NULL TSRMLS_CC, ib_trans->link_rsrc, "InterBase link", NULL, 2, le_link, le_plink);
|
||||
|
||||
if (ib_link) {
|
||||
if (ib_link->trans[ib_trans->trans_num] != NULL) {
|
||||
IBDEBUG("Rolling back unhandled transaction...");
|
||||
if (isc_rollback_transaction(IB_STATUS, &ib_link->trans[ib_trans->trans_num])) {
|
||||
_php_ibase_error();
|
||||
if (ib_link) {
|
||||
if (ib_link->trans[ib_trans->trans_num] != NULL) {
|
||||
IBDEBUG("Rolling back unhandled transaction...");
|
||||
if (isc_rollback_transaction(IB_STATUS, &ib_link->trans[ib_trans->trans_num])) {
|
||||
_php_ibase_error();
|
||||
}
|
||||
ib_link->trans[ib_trans->trans_num] = NULL;
|
||||
}
|
||||
ib_link->trans[ib_trans->trans_num] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
efree(ib_trans);
|
||||
}
|
||||
/* }}} */
|
||||
|
Loading…
Reference in New Issue
Block a user