diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2020-11-30 13:02:56 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2020-12-07 15:44:04 +0100 |
commit | 0e10d8cb7cf68ea97739b1f1f2426b52b6549d60 (patch) | |
tree | ed3910ddbac0bab346ed12a6b7149404d1ac35d4 | |
parent | b7dd2074abf4fe1eab3dab0c611cc4bfe73aa1ab (diff) | |
download | nextcloud-server-0e10d8cb7cf68ea97739b1f1f2426b52b6549d60.tar.gz nextcloud-server-0e10d8cb7cf68ea97739b1f1f2426b52b6549d60.zip |
Fix locking logic
The comparrison on php8 return true while <php8 it is false.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-rw-r--r-- | lib/private/Lock/MemcacheLockingProvider.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Lock/MemcacheLockingProvider.php b/lib/private/Lock/MemcacheLockingProvider.php index 6b01f0aafc6..439894e901f 100644 --- a/lib/private/Lock/MemcacheLockingProvider.php +++ b/lib/private/Lock/MemcacheLockingProvider.php @@ -61,7 +61,7 @@ class MemcacheLockingProvider extends AbstractLockingProvider { public function isLocked(string $path, int $type): bool { $lockValue = $this->memcache->get($path); if ($type === self::LOCK_SHARED) { - return $lockValue > 0; + return is_int($lockValue) && $lockValue > 0; } elseif ($type === self::LOCK_EXCLUSIVE) { return $lockValue === 'exclusive'; } else { |