Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The following notice is appearing on every page:
Notice: Undefined variable: result in dmemcache_get() (line 107 of sites/all/modules/memcache/dmemcache.inc)
The reason is that dmemcache_get()
defines a variable called $success
but actually returns a variable called $result
.
Comment | File | Size | Author |
---|---|---|---|
#4 | dmemcache_get-fix_undefined_variable-1190426-4.patch | 831 bytes | pillarsdotnet |
#1 | dmemcache_get-undefined_result-1190426-1.patch | 694 bytes | pillarsdotnet |
Comments
Comment #1
pillarsdotnet CreditAttribution: pillarsdotnet commentedPatch/fix:
Comment #2
jghyde CreditAttribution: jghyde commentedPatch tested and appears to fix the problem on latest Drupal 7.3-dev
Comment #3
teddyboar CreditAttribution: teddyboar commentedHad the same error message in the logs; tested the patch and it fixes the problem.
Comment #4
pillarsdotnet CreditAttribution: pillarsdotnet commentedUnfortunately, the patch in #1 is absolutely wrong.
Here is a corrected patch.
Comment #5
teddyboar CreditAttribution: teddyboar commentedWell, patch in #4 was my first thought too at first sight (regarding the behavior in dmemcache_get_multi() for example). After a better look, patch #1 only removed the error message.
Comment #6
catchThanks! Committed and pushed.
Comment #8
jan.s CreditAttribution: jan.s commentedCommitted yes, but not included in 7.x-1.0-rc1 !
Comment #9
BerdirIt's not supposed to.
7.x-1.0-rc1 is an old outdated version and is not supposed to be used. Use 7.x-0.2.
Comment #10
jan.s CreditAttribution: jan.s commentedVersion 7.x-0.2 does not include this patch.
Comment #11
jan.s CreditAttribution: jan.s commentedBerdir, 7.x-1.0-rc1 was released later than 7.x-0.2. Why do you think it is outdated?
Nevertheless, both releases do not include the patch. In addition the releases have been released months after reporting the bug and providing the patch. So I will reopen this ticket. Correct me, if I'm wrong.
Comment #12
jan.s CreditAttribution: jan.s commentedComment #13
catchI can't see this in the 7.x-1.x branch, but neither does the patch apply any more, so this will need a re-roll.
Comment #14
BerdirI think this is also being dealt with in #1184678: Enhance failure tolerance.
Sorry about the confusion re the version number, I meant 1.0-beta4.
Comment #15
BerdirThe linked issue has been commited, can anyone confirm that this is resolved?
Comment #16
DamienMcKennaYes, the 7.x-1.x-dev codebase does have the fix present.
Comment #17
catchComment #18
jan.s CreditAttribution: jan.s commentedThank you!
7.x-1.0-rc2 is working as expected.