php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #59774 deleteMulti doesn't return result codes only
Submitted: 2011-05-18 15:16 UTC Modified: 2011-07-26 13:03 UTC
From: marc-bennewitz at arcor dot de Assigned:
Status: Wont fix Package: memcached (PECL)
PHP Version: 5.3.5 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: marc-bennewitz at arcor dot de
New email:
PHP Version: OS:

 

 [2011-05-18 15:16 UTC] marc-bennewitz at arcor dot de
Description:
------------
The new method deleteMulti[ByKey] should return only valid result codes comparable with Memcached::RES_*.
It makes it simpler to check the result and what was going on.
For now it returns an array of result codes expect a successful deletion which returns a boolean true.

Reproduce code:
---------------
$rs = $m->deleteMulti(array('key1', 'key2', 'key3'));
var_dump($rs);

Expected result:
----------------
array(
    'key1' => true,
    'key2' => 16,
    'key3' => true,
}

Actual result:
--------------
array(
    'key1' => 0,
    'key2' => 16,
    'key3' => 0,
}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-07-26 13:03 UTC] andrei@php.net
It is working as expected. Returning true for success and the 
actual error code on failure would be inconsistent. 0 is a 
valid code, it means success.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Oct 20 07:01:23 2020 UTC