Commit 06e93485 authored by Jeremy's avatar Jeremy Committed by Jeremy

Issue #2413663 by Jeremy: Notice: Undefined index in lock_release()

parent 30394615
......@@ -133,7 +133,7 @@ function lock_wait($name, $delay = 30) {
function lock_release($name) {
global $locks;
if (dmemcache_get($name, 'semaphore') == $locks[$name]) {
if (isset($locks[$name]) && (dmemcache_get($name, 'semaphore') == $locks[$name])) {
dmemcache_delete($name, 'semaphore');
// We unset unconditionally since caller assumes lock is released anyway.
unset($locks[$name]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment