Bug #62489 [Opn->Csd]: dba_insert not working as expected
| From: | lstrojny@php.net | Date: | Tue, 15 Jan 2013 08:39:23 +0000 |
| Subject: | Bug #62489 [Opn->Csd]: dba_insert not working as expected | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-176024@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=62489&edit=1
ID: 62489
Updated by: lstrojny@php.net
Reported by: marc-bennewitz at arcor dot de
Summary: dba_insert not working as expected
-Status: Open
+Status: Closed
Type: Bug
Package: DBM/DBA related
Operating System: openSUSE 11.3 (x86_64)
PHP Version: 5.4.4
-Assigned To:
+Assigned To: lstrojny
Block user comment: N
Private report: N
New Comment:
The fix for this bug has been committed.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
Fixed in the 5.5 and master trees.
Previous Comments:
------------------------------------------------------------------------
[2012-07-06 08:40:29] marc-bennewitz at arcor dot de
Description:
------------
The function "dba_insert" doesn't work as expected with most handlers.
On calling "dba_insert" on an already existing key the function should return false and do
not trigger a warning but that's not the case on most tested handlers.
Test script:
---------------
$dba = dba_open(sys_get_temp_dir() . DIRECTORY_SEPARATOR . uniqid('dba_'), 'c',
'qdbm');
var_dump(dba_insert('key', 'test1', $dba));
var_dump(dba_insert('key', 'test2', $dba));
var_dump(dba_fetch('key', $dba));
Expected result:
----------------
bool(true)
bool(false)
string(5) "test1"
Actual result:
--------------
RETURN1 RETURN2 WRANING
flatfile true false YES
inifile true true NO
gdbm true false YES
qdbm true false YES
db4 true false NO
-> Didn't test not listed handlers !
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=62489&edit=1