aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2020-11-30 13:02:56 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2020-12-07 15:44:04 +0100
commit0e10d8cb7cf68ea97739b1f1f2426b52b6549d60 (patch)
treeed3910ddbac0bab346ed12a6b7149404d1ac35d4
parentb7dd2074abf4fe1eab3dab0c611cc4bfe73aa1ab (diff)
downloadnextcloud-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.php2
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 {