-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ibase_close not working as expected #22
Comments
So it looks like if ibase_close is called without arguments, only the latest resource (default_link) will be closed, after which any further calls to ibase_close without arguments will result in the function returning false. https://github.com/FirebirdSQL/php-firebird/blob/master/interbase.c#L1060 Whenever ibase_close is called with a connection, the function will always return true. We end up having problems because of the behavior of ibase_close. (The behaviour is not the same in previous versions - we tested it in PHP 7.0). Our test does the following:
|
It looks like ibase_close noes not work as expected, at least if the docs are to be believed. Closing a connection doesn't work for us with PHP7.4.3 and version 1.1.1 of the driver. Other combinations tested yields the same result. There also seems to be a mismatch between the docs and the test case (ibase_close_001.phpt).
If we have a look at the test case:
If the connection ($x) is truly closed, the second and third call to ibase_close should return false. However, it seems like calling ibase_close($x) does not close the connection. Calling ibase_close() without a resource seems to close all connections, which is ok but not documented.
The text was updated successfully, but these errors were encountered: