php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58734 OPT_RECV_TIMEOUT is defined incorrectly
Submitted: 2009-06-23 03:48 UTC Modified: 2009-06-23 13:37 UTC
From: php at muckrake dot net Assigned:
Status: Closed Package: memcached (PECL)
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
34 - 21 = ?
Subscribe to this entry?

 
 [2009-06-23 03:48 UTC] php at muckrake dot net
Description:
------------
OPT_RECV_TIMEOUT is defined as 
MEMCACHED_BEHAVIOR_RETRY_TIMEOUT instead of 
MEMCACHED_BEHAVIOR_RCV_TIMEOUT:

from php_memcached.c:

REGISTER_MEMC_CLASS_CONST_LONG(OPT_RETRY_TIMEOUT, 
MEMCACHED_BEHAVIOR_RETRY_TIMEOUT);
[...]
REGISTER_MEMC_CLASS_CONST_LONG(OPT_RECV_TIMEOUT, 
MEMCACHED_BEHAVIOR_RETRY_TIMEOUT);

shouldn't this be:

REGISTER_MEMC_CLASS_CONST_LONG(OPT_RECV_TIMEOUT, 
MEMCACHED_BEHAVIOR_RCV_TIMEOUT);

Reproduce code:
---------------
<?php
$memcached = new Memcached();
$memcached->setOption(Memcached::OPT_RETRY_TIMEOUT, 1);
$memcached->setOption(Memcached::OPT_RECV_TIMEOUT, 2);
echo 'Memcached::OPT_RETRY_TIMEOUT: ' . $memcached->getOption(Memcached::OPT_RETRY_TIMEOUT) . "\n";
echo 'Memcached::OPT_RECV_TIMEOUT: ' . $memcached->getOption(Memcached::OPT_RECV_TIMEOUT) . "\n";

Expected result:
----------------
Memcached::OPT_RETRY_TIMEOUT: 1
Memcached::OPT_RECV_TIMEOUT: 2

Actual result:
--------------
Memcached::OPT_RETRY_TIMEOUT: 2
Memcached::OPT_RECV_TIMEOUT: 2

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-06-23 13:37 UTC] andrei@php.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.


 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Sep 23 04:01:25 2020 UTC