Merge pull request #890 from nextcloud/fix/849/throw-exception-on-null-token

exception on null token
This commit is contained in:
Maxence Lange 2022-01-06 16:01:53 -01:00 committed by GitHub
commit 5f8e2a0c7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -585,6 +585,10 @@ class ShareByCircleProvider implements IShareProvider {
* @throws ShareNotFound
*/
public function getShareByToken($token): IShare {
if (is_null($token)) {
throw new ShareNotFound();
}
try {
$wrappedShare = $this->shareWrapperService->getShareByToken($token);
} catch (ShareWrapperNotFoundException $e) {