summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2016-08-25 16:31:03 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2016-08-25 16:31:03 +0200
commit96ea8de59182be1bff82663b92cc47e7e2f7b872 (patch)
tree1a2329fa4e72c5c51c26a8b62c6e596e028093e6 /ext
parent2e1bb5ee22bdf2bf7d34546ecef69e7b137d8091 (diff)
parent5f6a1d14722ca3c76673055891aa24b7fe353055 (diff)
downloadphp-git-96ea8de59182be1bff82663b92cc47e7e2f7b872.tar.gz
Merge branch 'PHP-7.0' into PHP-7.1
Diffstat (limited to 'ext')
-rw-r--r--ext/dba/tests/bug71514.phpt28
1 files changed, 28 insertions, 0 deletions
diff --git a/ext/dba/tests/bug71514.phpt b/ext/dba/tests/bug71514.phpt
new file mode 100644
index 0000000000..08338f3793
--- /dev/null
+++ b/ext/dba/tests/bug71514.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Bug #71514 (Bad dba_replace condition because of wrong API usage)
+--SKIPIF--
+<?php
+if (!extension_loaded('dba')) die('skip dba extension not available');
+if (!in_array('inifile', dba_handlers())) die('skip inifile handler not available');
+?>
+--FILE--
+<?php
+$filename = __DIR__ . DIRECTORY_SEPARATOR . 'bug71514.ini';
+
+$db = dba_open($filename, 'c', 'inifile');
+
+dba_insert('foo', 'value1', $db);
+dba_replace('foo', 'value2', $db);
+var_dump(dba_fetch('foo', $db));
+
+dba_close($db);
+?>
+==DONE==
+--EXPECT--
+string(6) "value2"
+==DONE==
+--CLEAN--
+<?php
+$filename = __DIR__ . DIRECTORY_SEPARATOR . 'bug71514.ini';
+unlink($filename);
+?>