diff --git a/lib/Controller/PublicShareAuthController.php b/lib/Controller/PublicShareAuthController.php index f40882b1915..c1129d722fd 100644 --- a/lib/Controller/PublicShareAuthController.php +++ b/lib/Controller/PublicShareAuthController.php @@ -49,7 +49,7 @@ public function __construct( * otherwise. * * @param string $shareToken Token of the file share - * @return DataResponse|DataResponse, array{}> + * @return DataResponse|DataResponse * * 201: Room created successfully * 404: Share not found @@ -59,18 +59,18 @@ public function __construct( public function createRoom(string $shareToken): DataResponse { try { $share = $this->shareManager->getShareByToken($shareToken); - } catch (ShareNotFound $e) { - return new DataResponse([], Http::STATUS_NOT_FOUND); + } catch (ShareNotFound) { + return new DataResponse(null, Http::STATUS_NOT_FOUND); } if (!$share->getSendPasswordByTalk()) { - return new DataResponse([], Http::STATUS_NOT_FOUND); + return new DataResponse(null, Http::STATUS_NOT_FOUND); } $sharerUser = $this->userManager->get($share->getSharedBy()); if (!$sharerUser instanceof IUser) { - return new DataResponse([], Http::STATUS_NOT_FOUND); + return new DataResponse(null, Http::STATUS_NOT_FOUND); } if ($share->getShareType() === IShare::TYPE_EMAIL) {