summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-06-27 11:58:35 +0200
committerGitHub <noreply@github.com>2016-06-27 11:58:35 +0200
commit726961172242d4d529af97a730ef9f57ec746eb2 (patch)
tree849bc0fb09ff6cafd845738c1988a7c84ac464fa /lib/private
parentb9edcd78bf25249ab32fed32519d3a1d1c083e6d (diff)
parente677ad56fd58e56151ec5420b72dc5fd797e2eb8 (diff)
downloadnextcloud-server-726961172242d4d529af97a730ef9f57ec746eb2.tar.gz
nextcloud-server-726961172242d4d529af97a730ef9f57ec746eb2.zip
Merge pull request #25258 from owncloud/integritycheck-whennotinstalled
Make code integrity check work when OC is not installed yet
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/IntegrityCheck/Checker.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/private/IntegrityCheck/Checker.php b/lib/private/IntegrityCheck/Checker.php
index ab68f752206..57127f280c4 100644
--- a/lib/private/IntegrityCheck/Checker.php
+++ b/lib/private/IntegrityCheck/Checker.php
@@ -108,7 +108,11 @@ class Checker {
* applicable for very specific scenarios and we should not advertise it
* too prominent. So please do not add it to config.sample.php.
*/
- $isIntegrityCheckDisabled = $this->config->getSystemValue('integrity.check.disabled', false);
+ if ($this->config !== null) {
+ $isIntegrityCheckDisabled = $this->config->getSystemValue('integrity.check.disabled', false);
+ } else {
+ $isIntegrityCheckDisabled = false;
+ }
if($isIntegrityCheckDisabled === true) {
return false;
}
@@ -401,7 +405,10 @@ class Checker {
return json_decode($cachedResults, true);
}
- return json_decode($this->config->getAppValue('core', self::CACHE_KEY, '{}'), true);
+ if ($this->config !== null) {
+ return json_decode($this->config->getAppValue('core', self::CACHE_KEY, '{}'), true);
+ }
+ return [];
}
/**
@@ -416,7 +423,9 @@ class Checker {
if(!empty($result)) {
$resultArray[$scope] = $result;
}
- $this->config->setAppValue('core', self::CACHE_KEY, json_encode($resultArray));
+ if ($this->config !== null) {
+ $this->config->setAppValue('core', self::CACHE_KEY, json_encode($resultArray));
+ }
$this->cache->set(self::CACHE_KEY, json_encode($resultArray));
}