php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57400 undefined keys are unhandled
Submitted: 2006-11-28 06:00 UTC Modified: 2007-02-13 18:04 UTC
From: reinier at skoef dot nl Assigned:
Status: Closed Package: memcache (PECL)
PHP Version: 4.4.2 OS: FreeBSD 6.1-RC1
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: reinier at skoef dot nl
New email:
PHP Version: OS:

 

 [2006-11-28 06:00 UTC] reinier at skoef dot nl
Description:
------------
When using the set-function of the Memcache-package and do not define the key you want to set a certain value to, the package incorrectly uses the value-length as a key.

Reproduce code:
---------------
<?
  $mc = new memcached;
  $value = array("foo" => "bar");
  $mc->set($undefined_key, $value);
?>





Expected result:
----------------
Memcache should do nothing at all, since the defined keyname is null.

Actual result:
--------------
<10 new client connection
<10 set  1 1164711401 26
>10 CLIENT_ERROR bad command line format
<10 a:1:{s:3:"foo";s:3:"bar";}
>10 ERROR
<10 connection closed.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-02-13 18:04 UTC] tony2001 at phpclub dot net
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.

Added a check and a warning to prevent empty keys.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 13 07:01:26 2025 UTC