summaryrefslogtreecommitdiff
path: root/ext/mysqli/tests/mysqli_stmt_get_result2.phpt
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2020-01-05 19:49:34 +0100
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-01-30 17:05:07 +0100
commit5bf6aedae4556facb8b407426a13c4e8d5399dd5 (patch)
tree4ea904144c0e37df804bd0d8a33abdf59994faa3 /ext/mysqli/tests/mysqli_stmt_get_result2.phpt
parent453713868fa6e5bf0785c2f33e0b4415166418e6 (diff)
downloadphp-git-5bf6aedae4556facb8b407426a13c4e8d5399dd5.tar.gz
Promote mysqli warnings to exceptions
Closes GH-5058
Diffstat (limited to 'ext/mysqli/tests/mysqli_stmt_get_result2.phpt')
-rw-r--r--ext/mysqli/tests/mysqli_stmt_get_result2.phpt16
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/mysqli/tests/mysqli_stmt_get_result2.phpt b/ext/mysqli/tests/mysqli_stmt_get_result2.phpt
index ab261bd82b..f487868996 100644
--- a/ext/mysqli/tests/mysqli_stmt_get_result2.phpt
+++ b/ext/mysqli/tests/mysqli_stmt_get_result2.phpt
@@ -132,18 +132,19 @@ if (!function_exists('mysqli_stmt_get_result'))
mysqli_stmt_close($stmt);
mysqli_close($link);
- if (false !== ($res = mysqli_stmt_get_result($stmt))) {
- printf("[026] Expecting false got %s/%s\n",
- gettype($res), $res);
- }
+ try {
+ mysqli_stmt_get_result($stmt);
+ } catch (Error $exception) {
+ echo $exception->getMessage() . "\n";
+ }
- print "done!";
+ print "done!";
?>
--CLEAN--
<?php
require_once("clean_table.inc");
?>
---EXPECTF--
+--EXPECT--
array(2) {
["id"]=>
int(1)
@@ -159,6 +160,5 @@ array(2) {
}
NULL
[017] [2014] Commands out of sync; you can't run this command now
-
-Warning: mysqli_stmt_get_result(): Couldn't fetch mysqli_stmt in %s on line %d
+mysqli_stmt object is already closed
done!