Skip to content

Commit 426602a

Browse files
authored
Throw exception when previous execution result was not properly released in PHP code.
1 parent bd522d6 commit 426602a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ibase_query.c

+4
Original file line numberDiff line numberDiff line change
@@ -1854,6 +1854,10 @@ PHP_FUNCTION(ibase_execute)
18541854
_php_ibase_error();
18551855
break;
18561856
}
1857+
if (ib_query->result_res->gc.refcount > 1) {
1858+
php_printf("ERROR: Query result of '%s' was not released before executing the same query again!\n", ib_query->query);
1859+
php_error_docref(NULL, E_ERROR, "Query result of '%s' was not released before executing the same query again!", ib_query->query); /* throw exception*/
1860+
}
18571861
zend_list_delete(ib_query->result_res);
18581862
ib_query->result_res = NULL;
18591863
}

0 commit comments

Comments
 (0)