From 2104c2ffdd4fb2f63c4150bd2ffd0ac35d5ea859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Mon, 1 Jun 2015 14:10:00 +0200 Subject: [PATCH] Fixing undefined index 'foo' --- lib/private/lock/memcachelockingprovider.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/private/lock/memcachelockingprovider.php b/lib/private/lock/memcachelockingprovider.php index 26957f8ced..3f32ab1d8c 100644 --- a/lib/private/lock/memcachelockingprovider.php +++ b/lib/private/lock/memcachelockingprovider.php @@ -111,6 +111,9 @@ class MemcacheLockingProvider implements ILockingProvider { throw new LockedException($path); } unset($this->acquiredLocks['exclusive'][$path]); + if (!isset($this->acquiredLocks['shared'][$path])) { + $this->acquiredLocks['shared'][$path] = 0; + } $this->acquiredLocks['shared'][$path]++; } else if ($targetType === self::LOCK_EXCLUSIVE) { // we can only change a shared lock to an exclusive if there's only a single owner of the shared lock