aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/App
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-02-17 21:34:20 +0100
committerGitHub <noreply@github.com>2018-02-17 21:34:20 +0100
commitac63c207a962466ccabf140a4e3f5390b34a8beb (patch)
tree2ddb01bfd87308c13733b53ae949c58556811e88 /lib/private/App
parentd953db8683b10bdaf55ab8f3bb8b6b1c42870270 (diff)
parent9b68f80c4bf73ddc845fa64dba90cd858d663af6 (diff)
downloadnextcloud-server-ac63c207a962466ccabf140a4e3f5390b34a8beb.tar.gz
nextcloud-server-ac63c207a962466ccabf140a4e3f5390b34a8beb.zip
Merge pull request #8411 from nextcloud/add-strict-types-to-oc_app
Add strict types to OC_App
Diffstat (limited to 'lib/private/App')
-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 81037b42613..690dcfe5639 100644
--- a/lib/private/App/AppManager.php
+++ b/lib/private/App/AppManager.php
@@ -380,10 +380,10 @@ class AppManager implements IAppManager {
return $data;
}
- public function getAppVersion(string $appId, bool $useCache = true) {
+ public function getAppVersion(string $appId, bool $useCache = true): string {
if(!$useCache || !isset($this->appVersions[$appId])) {
$appInfo = \OC::$server->getAppManager()->getAppInfo($appId);
- $this->appVersions[$appId] = ($appInfo !== null) ? $appInfo['version'] : '0';
+ $this->appVersions[$appId] = ($appInfo !== null && isset($appInfo['version'])) ? $appInfo['version'] : '0';
}
return $this->appVersions[$appId];
}