summaryrefslogtreecommitdiff
path: root/ext/mysqli/tests/bug42378.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mysqli/tests/bug42378.phpt')
-rw-r--r--ext/mysqli/tests/bug42378.phpt25
1 files changed, 12 insertions, 13 deletions
diff --git a/ext/mysqli/tests/bug42378.phpt b/ext/mysqli/tests/bug42378.phpt
index b3fd7ca524..f3bbe346fa 100644
--- a/ext/mysqli/tests/bug42378.phpt
+++ b/ext/mysqli/tests/bug42378.phpt
@@ -128,19 +128,18 @@ memory_limit=83886080
}
}
- if (!empty($expected))
- reset($expected);
- while ((list($k, $v) = each($expected)) && mysqli_stmt_fetch($stmt)) {
- if (!empty($expected)) {
- if ($result !== $v) {
- printf("[%03d] Row %d - expecting %s/%s got %s/%s [%s] with %s - %s.\n",
- $offset + 8,
- $k,
- gettype($v), $v,
- gettype($result), $result,
- $order_by_col,
- $format, $sql);
- }
+ foreach ($expected as $k => $v) {
+ if (!mysqli_stmt_fetch($stmt)) {
+ break;
+ }
+ if ($result !== $v) {
+ printf("[%03d] Row %d - expecting %s/%s got %s/%s [%s] with %s - %s.\n",
+ $offset + 8,
+ $k,
+ gettype($v), $v,
+ gettype($result), $result,
+ $order_by_col,
+ $format, $sql);
}
}