File tree Expand file tree Collapse file tree 3 files changed +51
-4
lines changed Expand file tree Collapse file tree 3 files changed +51
-4
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,9 @@ $x = ibase_connect($test_base);
1111var_dump (ibase_close ($ x ));
1212var_dump (ibase_close ($ x ));
1313var_dump (ibase_close ());
14- var_dump (ibase_close ('foo ' ));
1514
1615?>
1716--EXPECTF--
1817bool(true)
1918bool(true)
2019bool(true)
21-
22- Warning: ibase_close() expects parameter 1 to be resource, string given in %s on line %d
23- NULL
Original file line number Diff line number Diff line change 1+ --TEST--
2+ ibase_close(): Make sure passing a string to the function emits a warning
3+ --SKIPIF--
4+ <?php
5+ include ("skipif.inc " );
6+ include ("skipif-php8-or-newer.inc " );
7+ ?>
8+ --FILE--
9+ <?php
10+
11+ require ("interbase.inc " );
12+
13+ $ x = ibase_connect ($ test_base );
14+ var_dump (ibase_close ($ x ));
15+ var_dump (ibase_close ($ x ));
16+ var_dump (ibase_close ());
17+ var_dump (ibase_close ('foo ' ));
18+
19+ ?>
20+ --EXPECTF--
21+ bool(true)
22+ bool(true)
23+ bool(true)
24+
25+ Warning: ibase_close() expects parameter 1 to be resource, string given in %s on line %d
26+ NULL
Original file line number Diff line number Diff line change 1+ --TEST--
2+ ibase_close(): Make sure passing a string to the function throws an error.
3+ --SKIPIF--
4+ <?php
5+ include ("skipif.inc " );
6+ include ("skipif-php7-or-older.inc " );
7+ ?>
8+ --FILE--
9+ <?php
10+
11+ require ("interbase.inc " );
12+
13+ $ x = ibase_connect ($ test_base );
14+ var_dump (ibase_close ($ x ));
15+ var_dump (ibase_close ($ x ));
16+ var_dump (ibase_close ());
17+ var_dump (ibase_close ('foo ' ));
18+
19+ ?>
20+ --EXPECTF--
21+ bool(true)
22+ bool(true)
23+ bool(true)
24+
25+ Fatal error: Uncaught TypeError: ibase_close(): Argument #1 ($link_identifier) must be of type resource, string given in %a
You can’t perform that action at this time.
0 commit comments