1--TEST--
2mysqli_fetch_row()
3--SKIPIF--
4<?php
5require_once('skipif.inc');
6require_once('skipifconnectfailure.inc');
7?>
8--FILE--
9<?php
10    require_once("connect.inc");
11
12    require('table.inc');
13    if (!$res = mysqli_query($link, "SELECT id, label, id AS _id FROM test ORDER BY id LIMIT 1")) {
14        printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
15    }
16
17    print "[004]\n";
18    var_dump(mysqli_fetch_row($res));
19
20    print "[005]\n";
21    var_dump(mysqli_fetch_row($res));
22
23    mysqli_free_result($res);
24
25    try {
26        mysqli_fetch_row($res);
27    } catch (Error $exception) {
28        echo $exception->getMessage() . "\n";
29    }
30
31    mysqli_close($link);
32    print "done!";
33?>
34--CLEAN--
35<?php
36    require_once("clean_table.inc");
37?>
38--EXPECT--
39[004]
40array(3) {
41  [0]=>
42  string(1) "1"
43  [1]=>
44  string(1) "a"
45  [2]=>
46  string(1) "1"
47}
48[005]
49NULL
50mysqli_result object is already closed
51done!
52