@@ -30,7 +30,7 @@ public function __construct(
3030 private IUserManager $ userManager ,
3131 IUserSession $ userSession ,
3232 private IAppConfig $ appConfig ,
33- private TrustedServers $ trustedServers ,
33+ private ? TrustedServers $ trustedServers ,
3434 ) {
3535 $ this ->userId = $ userSession ->getUser ()?->getUID() ?? '' ;
3636 $ this ->shareeEnumeration = $ this ->config ->getAppValue ('core ' , 'shareapi_allow_share_dialog_user_enumeration ' , 'yes ' ) === 'yes ' ;
@@ -107,7 +107,7 @@ public function search($search, $limit, $offset, ISearchResult $searchResult): b
107107 'shareType ' => IShare::TYPE_REMOTE ,
108108 'shareWith ' => $ cloudId ,
109109 'server ' => $ serverUrl ,
110- 'isTrustedServer ' => $ this ->trustedServers ->isTrustedServer ($ serverUrl ),
110+ 'isTrustedServer ' => $ this ->trustedServers ? ->isTrustedServer($ serverUrl ) ?? false ,
111111 ],
112112 ];
113113 } else {
@@ -120,7 +120,7 @@ public function search($search, $limit, $offset, ISearchResult $searchResult): b
120120 'shareType ' => IShare::TYPE_REMOTE ,
121121 'shareWith ' => $ cloudId ,
122122 'server ' => $ serverUrl ,
123- 'isTrustedServer ' => $ this ->trustedServers ->isTrustedServer ($ serverUrl ),
123+ 'isTrustedServer ' => $ this ->trustedServers ? ->isTrustedServer($ serverUrl ) ?? false ,
124124 ],
125125 ];
126126 }
@@ -147,7 +147,7 @@ public function search($search, $limit, $offset, ISearchResult $searchResult): b
147147 'shareType ' => IShare::TYPE_REMOTE ,
148148 'shareWith ' => $ search ,
149149 'server ' => $ serverUrl ,
150- 'isTrustedServer ' => $ this ->trustedServers ->isTrustedServer ($ serverUrl ),
150+ 'isTrustedServer ' => $ this ->trustedServers ? ->isTrustedServer($ serverUrl ) ?? false ,
151151 ],
152152 ];
153153 }
0 commit comments