xref: /PHP-5.4/ext/mysqli/tests/bug36420.phpt (revision eb0e09f5)
1--TEST--
2Bug #36420 (segfault when access result->num_rows after calling result->close())
3--SKIPIF--
4<?php
5require_once('skipif.inc');
6require_once('skipifconnectfailure.inc');
7?>
8--FILE--
9<?php
10
11require_once("connect.inc");
12$mysqli = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
13
14$result = $mysqli->query('select 1');
15
16$result->close();
17echo $result->num_rows;
18
19$mysqli->close();
20echo $result->num_rows;
21
22echo "Done\n";
23?>
24--EXPECTF--
25Warning: main(): Couldn't fetch mysqli_result in %s on line %d
26
27Warning: main(): Couldn't fetch mysqli_result in %s on line %d
28Done
29