|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: marc-bennewitz at arcor dot de
New email:
PHP Version: OS:


 [2011-05-18 15:16 UTC] marc-bennewitz at arcor dot de
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'));

Expected result:
    'key1' => true,
    'key2' => 16,
    'key3' => true,

Actual result:
    'key1' => 0,
    'key2' => 16,
    'key3' => 0,


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-07-26 13:03 UTC]
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-2021 The PHP Group
All rights reserved.
Last updated: Sat Sep 18 11:03:36 2021 UTC