1--TEST--
2next_result reports errors from previous calls
3--EXTENSIONS--
4mysqli
5--SKIPIF--
6<?php
7require_once 'skipifconnectfailure.inc';
8?>
9--FILE--
10<?php
11
12require_once __DIR__ . '/connect.inc';
13
14mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
15
16$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
17
18try {
19    $mysqli->query("Syntax Error");
20} catch (mysqli_sql_exception $e) {
21}
22$mysqli->next_result();
23
24print "done!";
25
26?>
27--EXPECTF--
28done!
29