diff --git a/src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentLockManager.php b/src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentLockManager.php index d4338b208..e6889778c 100644 --- a/src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentLockManager.php +++ b/src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentLockManager.php @@ -52,7 +52,16 @@ class ChillDocumentLockManager implements DocumentLockManagerInterface public function hasLock(Document $document, RequestInterface $request): bool { - return $this->redis->exists($this->getCacheId($document)) > 0; + $r = $this->redis->exists($this->getCacheId($document)); + + if (is_bool($r)) { + return $r; + } + if (is_int($r)) { + return $r > 0; + } + + throw new \RuntimeException('data type not supported'); } public function setLock(Document $document, string $lockId, RequestInterface $request): bool