|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-04-17 01:39 UTC] brian at moonspot dot net
Description:
------------
Currently, when a key is invalid, the get method/function simply returns false. It would be nice if either an E_WARNING or E_NOTICE was thrown when a key is not a valid memcached key
Reproduce code:
---------------
$m = new Memcached();
$res = $m->addServer("localhost", 11211);
$res = $m->set("this is a key with spaces", 1);
Expected result:
----------------
E_WARNING or E_NOTICE
Actual result:
--------------
No error is thrown.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 00:00:01 2025 UTC |
On memcache it works fine to use special chars for cache ids: $memcache->set("id &% \/\$\x00\t\n\r\\", 'data', 0, 100); var_dump($memcache->get("id &% \/\$\x00\t\n\r\\")); But on memcached the same code generates a Memcached::RES_BAD_KEY_PROVIDED. It would be very nice if memcached will handle all characters as keys in the future?