summaryrefslogtreecommitdiff
path: root/ext/pgsql/tests
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2018-06-29 18:36:22 +0200
committerAnatol Belski <ab@php.net>2018-06-29 18:36:22 +0200
commit4ff6c0cb447e55522ccb40fe18547c79727dbb73 (patch)
tree4887768e4eb320188889669a79a45dc173a05f7b /ext/pgsql/tests
parent6e77a60a75445c863f85f81a83e5c2dd28f0e877 (diff)
parent486f18f09e6c9f07719e22677ac9f9b432c7980b (diff)
downloadphp-git-4ff6c0cb447e55522ccb40fe18547c79727dbb73.tar.gz
Merge branch 'PHP-7.2'
* PHP-7.2: Fixed bug #76548 pg_fetch_result did not fetch the next row
Diffstat (limited to 'ext/pgsql/tests')
-rw-r--r--ext/pgsql/tests/bug76548.phpt23
1 files changed, 23 insertions, 0 deletions
diff --git a/ext/pgsql/tests/bug76548.phpt b/ext/pgsql/tests/bug76548.phpt
new file mode 100644
index 0000000000..3a0b8922e1
--- /dev/null
+++ b/ext/pgsql/tests/bug76548.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #76548 pg_fetch_result did not fetch the next row
+--SKIPIF--
+<?php include("skipif.inc"); ?>
+--FILE--
+<?php
+include('config.inc');
+
+$conn = pg_connect($conn_str);
+
+$result = pg_query($conn, 'SELECT v FROM (VALUES (1), (2), (3)) AS t(v)');
+
+while ($value = pg_fetch_result($result, 0)) {
+ var_dump($value); // should be 1, 2 then 3.
+}
+
+?>
+==DONE==
+--EXPECTF--
+string(1) "1"
+string(1) "2"
+string(1) "3"
+==DONE==