#45660 [Opn->Bgs]: Memcache documentation / behavior mismatch on get()
| From: | dmytton@php.net | Date: | Sun, 03 Aug 2008 21:02:44 +0000 |
| Subject: | #45660 [Opn->Bgs]: Memcache documentation / behavior mismatch on get() | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-1048@lists.php.net to get a copy of this message | ||
ID: 45660
Updated by: dmytton@php.net
Reported By: joe at econversions dot co dot uk
-Status: Open
+Status: Bogus
Bug Type: Documentation problem
Operating System: Ubuntu / Debian / Redhat
PHP Version: Irrelevant
New Comment:
Documentation is correct. In revision 1.83.2.14 the flags parameter was
added by mikl. See
http://cvs.php.net/viewvc.cgi/pecl/memcache/memcache.c?annotate=1.83.2.14
line 1392 and compare to 1.83.2.13 where it is not present.
Make sure you're running the latest PECL from
http://pecl.php.net/package/memcache
Previous Comments:
------------------------------------------------------------------------
[2008-07-30 15:36:20] joe at econversions dot co dot uk
Description:
------------
There is a discrepancy in the documentation and actual behaviour of the
Memcache module regarding Memcache::get().
The documentation states that the get() method supports two parameters,
the second being a flag (of which only the compression flag seems
listed).
It is apparent that the get() method only supports one parameter
exactly, raising an e_warning.
This is a documentation update request.
Reproduce code:
---------------
php > $m = new Memcache();
php > $m->addServer('localhost', 11211);
php > echo $m->get('test', MEMCACHE_COMPRESSED);
Warning: Memcache::get() expects exactly 1 parameter, 2 given in php
shell code on line 1
Expected result:
----------------
No error/warning, supplied flags passed through.
Actual result:
--------------
e_warning.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45660&edit=1