#50612 [Opn->Bgs]: Memcached::setMulti can't support pure digit key
| From: | johannes@php.net | Date: | Wed, 30 Dec 2009 12:48:03 +0000 |
| Subject: | #50612 [Opn->Bgs]: Memcached::setMulti can't support pure digit key | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-146209@lists.php.net to get a copy of this message | ||
ID: 50612
Updated by: johannes@php.net
Reported By: gnujava at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Unknown/Other Function
Operating System: Linux 64bit
PHP Version: 5.3.1
New Comment:
Please report this at the pecl site, pecl.php.net. Thank you.
Previous Comments:
------------------------------------------------------------------------
[2009-12-30 12:33:02] gnujava at gmail dot com
Description:
------------
Memcached::setMulti can't support pure digit key
file: php_memcached.c
fun: php_memc_setMulti_impl
line: 1009
if (zend_hash_get_current_key_ex(Z_ARRVAL_P(entries), &str_key,
&str_key_len, &num_key, 0, NULL) != HASH_KEY_IS_STRING) {
continue;
}
HASH_KEY_IS_STRING is not good ideal.
Reproduce code:
---------------
---
From manual page: memcached.setmulti#Description
---
$m = new Memcached();
$m->addServer('localhost', 11211);
$items = array(
'123' => 'value1' // key is pure number but that type is
string, and php engine will turn string(123) to int(123) key.
);
$m->setMulti($items);
var_dump($m->get('123')); // '123'=>'value1' not in
memcached
Expected result:
----------------
string(6) "value1"
Actual result:
--------------
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50612&edit=1