From 5c8719aa0345d56e7a60c30068a53d953175eccb Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Thu, 4 Oct 2018 13:04:58 +0200 Subject: [PATCH] Allow userId to be null Fixes #10852 A quick hack. Still ensures some type safety however now also accepts null. Else we'd need to add a whole new layer of middlewares. This can only happen when a guest user wants to access a controller that requries the user_id. Signed-off-by: Roeland Jago Douma --- apps/files_sharing/lib/Controller/ShareAPIController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index 461c0e47320b3..308e7bbb7429a 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -113,7 +113,7 @@ public function __construct( IUserManager $userManager, IRootFolder $rootFolder, IURLGenerator $urlGenerator, - string $userId, + string $userId = null, IL10N $l10n, IConfig $config, IAppManager $appManager,