|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-05-27 20:54 UTC] ab@php.net
[2017-05-27 20:54 UTC] ab@php.net
-Status: Open
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 08:00:01 2025 UTC |
Description: ------------ When a flatfile database is opened in 'c' mode, fetching an entry after having replaced it returns the old value. Note, that the return value of dba_replace() is correct, i.e. the entry has indeed been updated. This issue occurs only on Windows, but not on Linux. Test script: --------------- <?php $filename = __DIR__ . DIRECTORY_SEPARATOR . 'test.txt'; if (file_exists($filename)) unlink($filename); $db = dba_open($filename, 'c', 'flatfile'); dba_insert('foo', 'bar', $db); var_dump(dba_replace('foo', 'baz', $db)); var_dump(dba_fetch('foo', $db)); dba_close($db); Expected result: ---------------- bool(true) string(3) "baz" Actual result: -------------- bool(true) string(3) "bar"