#50612 [NEW]: Memcached::setMulti can't support pure digit key

From: Date: Wed, 30 Dec 2009 12:33:02 +0000
Subject: #50612 [NEW]: Memcached::setMulti can't support pure digit key
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-146208@lists.php.net to get a copy of this message
From: gnujava at gmail dot com Operating system: Linux 64bit PHP version: 5.3.1 PHP Bug Type: Unknown/Other Function Bug description: Memcached::setMulti can't support pure digit key 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 bug report at http://bugs.php.net/?id=50612&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50612&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50612&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50612&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50612&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50612&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50612&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50612&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50612&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50612&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50612&r=support Expected behavior: http://bugs.php.net/fix.php?id=50612&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50612&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50612&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50612&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50612&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=50612&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50612&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50612&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50612&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50612&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50612&r=mysqlcfg

« previous php.bugs (#146208) next »