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:
parent
b7dd2074ab
commit
0e10d8cb7c
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue