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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sun Jan 05 05:01:28 2025 UTC