|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
16 + 31 = ?
Subscribe to this entry?

 [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: Sun Sep 19 23:03:36 2021 UTC