Skip to content

Commit fe13ee0

Browse files
committed
Merge branch 'PHP-7.1'
2 parents 7b44d60 + 96ea8de commit fe13ee0

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

ext/dba/tests/bug71514.phpt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
--TEST--
2+
Bug #71514 (Bad dba_replace condition because of wrong API usage)
3+
--SKIPIF--
4+
<?php
5+
if (!extension_loaded('dba')) die('skip dba extension not available');
6+
if (!in_array('inifile', dba_handlers())) die('skip inifile handler not available');
7+
?>
8+
--FILE--
9+
<?php
10+
$filename = __DIR__ . DIRECTORY_SEPARATOR . 'bug71514.ini';
11+
12+
$db = dba_open($filename, 'c', 'inifile');
13+
14+
dba_insert('foo', 'value1', $db);
15+
dba_replace('foo', 'value2', $db);
16+
var_dump(dba_fetch('foo', $db));
17+
18+
dba_close($db);
19+
?>
20+
==DONE==
21+
--EXPECT--
22+
string(6) "value2"
23+
==DONE==
24+
--CLEAN--
25+
<?php
26+
$filename = __DIR__ . DIRECTORY_SEPARATOR . 'bug71514.ini';
27+
unlink($filename);
28+
?>

0 commit comments

Comments
 (0)