php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59084 Null timeout changes meaning between version 3.0.1 and 3.0.4
Submitted: 2010-02-23 20:05 UTC Modified: 2010-03-27 16:33 UTC
From: j at 3crowd dot com Assigned:
Status: Not a bug Package: memcache (PECL)
PHP Version: 5.2.10 OS: Linux, Ubuntu amd64 2.6.31-14
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: j at 3crowd dot com
New email:
PHP Version: OS:

 

 [2010-02-23 20:05 UTC] j at 3crowd dot com
Description:
------------
An addServer call in versions of the memcache client library, prior to version 3.0.4, would set the timeout to 1 second regardless of the timeout setting. Developers would set the timeout to null expecting that the timeout would default to 1. Currently, in 3.0.4 setting the timeout to null causes the timeout to be case to 0 causing an instant timeout. This change in behavior caught us off guard when upgrading our php5-memcache package and isn't clear. If this behavior is intended then it might be worth a clear notice since it changes the semantics of null in that method call.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-02-23 20:06 UTC] j at 3crowd dot com
s/case/cast
 [2010-03-27 16:33 UTC] pierre dot php at gmail dot com
Yes, as NULL would mean that you don't pass a timeout. If you like to have a default timeout without changing your code (or in general) you can use the memcache.default_timeout_ms ini setting.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Jan 27 21:03:35 2022 UTC