Closed (fixed)
Project:
Memcache API and Integration
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Aug 2012 at 10:25 UTC
Updated:
1 May 2013 at 23:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
valderama commentedHere is the patch. Please review.
Thanks,
walter
Comment #2
helmo commentedI saw the same notices while updating a memcache installation...
Your patch seems sound, although I haven't been able to reproduce the problem.
Comment #3
mgiffordWe got these with 7.x-1.0. I don't think it would have been fixed in dev, as I found that the checks weren't being done in git.
We got these errors (when clearing cache). Could be that it should be set up with something else. However, just having a check for null values is a good practice.
The patch above only addressed the issue at line 30 not at line 65, so I updated this patch to take them both out.
Comment #4
nerdcore commentedProper variable checking is always good practice, although I am concerned about why these notices cropped up after running memcache for a week (or more) without any notices. A major change I made to the site where I started getting these was enabling APC as an additional cache mechanism.
Should I be concerned about this, or were there always just some bad variable tests in place and this patch fixes the problem once and for all?
Comment #5
mgiffordRelated meta issue - #1830496: Better logging and handling of connect errors
Comment #6
markpavlitski commentedThe patch in #3 does not account for when $cache is a valid object but $cache->created does not exist.
The attached patch takes a slightly different approach.
Comment #7
sd46 commentedTested patch in comment #6, the patch prevents both notices from being generated.
I don't know how the notices were originally caused, but for testing purposes an easy way to recreate them is to change between
$conf['memcache_extension'] = 'Memcached';
and
$conf['memcache_extension'] = 'Memcache';
in the settings.php file, which will cause both notices to be generated on the next page load.
Comment #8
jeremy commentedThanks, committed #6 (the first notice was a typo which this fixes):
http://drupalcode.org/project/memcache.git/commit/812d5dc
Bug doesn't appear to affect 6.x-1.x; closing.
Comment #9.0
(not verified) commentedclarification