aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/App/AppManager.php
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-02-08 13:29:57 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-03-20 10:21:45 +0100
commit13c71ed24a4f30dd3dfb04bd09f16648fb4fe080 (patch)
tree2593ce5ec8cca788c25787af6c6ffa66ec58fe7e /lib/private/App/AppManager.php
parent78c17168185c21b6b788e40602f95c690fe441f9 (diff)
downloadnextcloud-server-13c71ed24a4f30dd3dfb04bd09f16648fb4fe080.tar.gz
nextcloud-server-13c71ed24a4f30dd3dfb04bd09f16648fb4fe080.zip
Small cleanups for AppManager
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/App/AppManager.php')
-rw-r--r--lib/private/App/AppManager.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/App/AppManager.php b/lib/private/App/AppManager.php
index d969f1d0260..5f243a1250e 100644
--- a/lib/private/App/AppManager.php
+++ b/lib/private/App/AppManager.php
@@ -237,7 +237,7 @@ class AppManager implements IAppManager {
public function isType(string $app, array $types): bool {
$appTypes = $this->getAppTypes($app);
foreach ($types as $type) {
- if (array_search($type, $appTypes) !== false) {
+ if (in_array($type, $appTypes, true)) {
return true;
}
}
@@ -253,7 +253,7 @@ class AppManager implements IAppManager {
private function getAppTypes(string $app): array {
//load the cache
if (count($this->appTypes) === 0) {
- $this->appTypes = \OC::$server->getAppConfig()->getValues(false, 'types');
+ $this->appTypes = $this->appConfig->getValues(false, 'types') ?: [];
}
if (isset($this->appTypes[$app])) {