Skip to content

Commit cd11446

Browse files
author
Daniela Mariaschi
committed
fix bug php#17040
User can't close a connection if there are blobs opened. He must close them before to not lose data....
1 parent 844c90a commit cd11446

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/interbase/interbase.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ static void _php_ibase_free_query(ibase_query *ib_query)
434434
}
435435
isc_transaction_info(IB_STATUS, &ib_query->trans,sizeof(tr_items), tr_items, sizeof(tmp), tmp );
436436
/* we have the trans still open and a statement to drop? */
437-
if ( !(IB_STATUS[0] && IB_STATUS[0]) && ib_query->stmt) {
437+
if ( !(IB_STATUS[0] && IB_STATUS[1]) && ib_query->stmt) {
438438
IBDEBUG("Dropping statement handle (free_query)...");
439439
if (isc_dsql_free_statement(IB_STATUS, &ib_query->stmt, DSQL_drop)){
440440
_php_ibase_error();
@@ -465,7 +465,7 @@ static void _php_ibase_free_blob(zend_rsrc_list_entry *rsrc TSRMLS_DC)
465465

466466
if (ib_blob->bl_handle != NULL) { /* blob open*/
467467
if (isc_cancel_blob(IB_STATUS, &ib_blob->bl_handle)) {
468-
_php_ibase_error();
468+
php_error(E_ERROR, "You can lose data. Close any blob after reading of writing it. Use ibase_blob_close() before calling ibase_close()");
469469
}
470470
}
471471
efree(ib_blob);

0 commit comments

Comments
 (0)