|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-03-13 15:21 UTC] felipe@php.net
[2011-03-13 15:23 UTC] felipe@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: felipe
[2011-03-13 15:23 UTC] felipe@php.net
[2011-03-13 15:51 UTC] marc-bennewitz at arcor dot de
[2011-03-13 15:53 UTC] felipe@php.net
[2011-03-13 15:57 UTC] felipe@php.net
[2011-03-17 12:43 UTC] felipe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 15:00:01 2025 UTC |
Description: ------------ dba_insert returns true if key already exists using handler 'flatfile' Test script: --------------- $path = __DIR__ . '/test.dba'; $mode = 'c'; $handler = 'flatfile'; @unlink($path); $dba = dba_open($path, $mode, $handler); // first insert success var_dump(dba_insert('key', 'value', $dba)); // second insert failed -> already exists var_dump(dba_insert('key', 'value', $dba)); Expected result: ---------------- bool(true) PHP Warning: dba_insert(key): Key already exists in /mnt/workspace/zf2/cache/tests/test_dba.php on line 15 Warning: dba_insert(key): Key already exists in /mnt/workspace/zf2/cache/tests/test_dba.php on line 15 bool(false) Actual result: -------------- bool(true) PHP Warning: dba_insert(key): Key already exists in /mnt/workspace/zf2/cache/tests/test_dba.php on line 15 Warning: dba_insert(key): Key already exists in /mnt/workspace/zf2/cache/tests/test_dba.php on line 15 bool(true)