Fix locking logic

The comparrison on php8 return true while <php8 it is false.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2020-11-30 13:02:56 +01:00
parent b7dd2074ab
commit 0e10d8cb7c
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 1 additions and 1 deletions

View File

@ -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 {