Skip to content

ibase_close not working as expected #22

@haanerg

Description

@haanerg

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:

--TEST--
ibase_close(): Basic test
--SKIPIF--
<?php include("skipif.inc"); ?>
--FILE--
<?php

require("interbase.inc");

$x = ibase_connect($test_base);
var_dump(ibase_close($x));
var_dump(ibase_close($x));
var_dump(ibase_close());
var_dump(ibase_close('foo'));

?>
--EXPECTF--
bool(true)
bool(true)
bool(true)

Warning: ibase_close() expects parameter 1 to be resource, string given in %s on line %d
NULL

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions