aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-06-24 10:24:41 +0200
committerVincent Petry <pvince81@owncloud.com>2016-06-24 10:24:41 +0200
commite677ad56fd58e56151ec5420b72dc5fd797e2eb8 (patch)
tree784f8a62e35905e57dc52fa3755dc0c4ec59d673 /lib
parent29068d3845065c3ca873513f3be6d27d886c9874 (diff)
downloadnextcloud-server-e677ad56fd58e56151ec5420b72dc5fd797e2eb8.tar.gz
nextcloud-server-e677ad56fd58e56151ec5420b72dc5fd797e2eb8.zip
Make code integrity check work when OC is not installed yet
Diffstat (limited to 'lib')
-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));
}