diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-06-27 11:58:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-27 11:58:35 +0200 |
commit | dbd176cfab14791d2373db5d2ecf39759e07aabc (patch) | |
tree | 849bc0fb09ff6cafd845738c1988a7c84ac464fa /lib | |
parent | 9681bf7cee6a9f6f076f16b180330140abc0c1c1 (diff) | |
parent | d345047b0f34d436d15fb91dd9b2aac91f8dc845 (diff) | |
download | nextcloud-server-dbd176cfab14791d2373db5d2ecf39759e07aabc.tar.gz nextcloud-server-dbd176cfab14791d2373db5d2ecf39759e07aabc.zip |
Merge pull request #25258 from owncloud/integritycheck-whennotinstalled
Make code integrity check work when OC is not installed yet
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/IntegrityCheck/Checker.php | 15 |
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)); } |