xref: /PHP-8.2/ext/mysqli/tests/bug63398.phpt (revision 62d393b1)
1--TEST--
2Bug #63398 (Segfault when polling closed link)
3--EXTENSIONS--
4mysqli
5--SKIPIF--
6<?php
7require_once "skipifconnectfailure.inc";
8?>
9--FILE--
10<?php
11require 'connect.inc';
12$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
13
14mysqli_close($link);
15
16$read = $error = $reject = array();
17$read[] = $error[] = $reject[] = $link;
18
19try {
20    mysqli_poll($read, $error, $reject, 1);
21} catch (Error $exception) {
22    echo $exception->getMessage() . "\n";
23}
24
25echo "okey";
26?>
27--EXPECT--
28mysqli object is already closed
29okey
30