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