diff --git a/lib/ShareByCircleProvider.php b/lib/ShareByCircleProvider.php index a8d1f3a4d..81d8f5e14 100644 --- a/lib/ShareByCircleProvider.php +++ b/lib/ShareByCircleProvider.php @@ -585,6 +585,10 @@ function (ShareWrapper $wrapper) { * @throws ShareNotFound */ public function getShareByToken($token): IShare { + if (is_null($token)) { + throw new ShareNotFound(); + } + try { $wrappedShare = $this->shareWrapperService->getShareByToken($token); } catch (ShareWrapperNotFoundException $e) {