|  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
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:
Solve the problem:
13 - 6 = ?
Subscribe to this entry?

 [2010-02-23 20:05 UTC] j at 3crowd dot com
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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-02-23 20:06 UTC] j at 3crowd dot com
 [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-2023 The PHP Group
All rights reserved.
Last updated: Tue Jan 31 05:03:50 2023 UTC