diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-06-19 16:26:06 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-06-19 16:26:06 +0200 |
commit | 3cbe40ffacfe2ab06cfbe7c81aeab947c30b6fb9 (patch) | |
tree | 688c31a0e49b6c6e9e15424dda4d74e1e8664e79 /settings/Controller | |
parent | c3aea9cdf6d88895b1a1fc54ead9a2f0aa792cd3 (diff) | |
download | nextcloud-server-3cbe40ffacfe2ab06cfbe7c81aeab947c30b6fb9.tar.gz nextcloud-server-3cbe40ffacfe2ab06cfbe7c81aeab947c30b6fb9.zip |
If cronErros is empty json_decode will return NULL
Fixes #9867
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'settings/Controller')
-rw-r--r-- | settings/Controller/CheckSetupController.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/settings/Controller/CheckSetupController.php b/settings/Controller/CheckSetupController.php index f83d0966eda..ecbb9839c75 100644 --- a/settings/Controller/CheckSetupController.php +++ b/settings/Controller/CheckSetupController.php @@ -513,6 +513,16 @@ Raw output ]; } + protected function getCronErrors() { + $errors = json_decode($this->config->getAppValue('core', 'cronErrors', ''), true); + + if (is_array($errors)) { + return $errors; + } + + return []; + } + /** * @return DataResponse */ @@ -527,7 +537,7 @@ Raw output 'hasWorkingFileLocking' => $this->hasWorkingFileLocking(), 'suggestedOverwriteCliURL' => $this->getSuggestedOverwriteCliURL(), 'cronInfo' => $this->getLastCronInfo(), - 'cronErrors' => json_decode($this->config->getAppValue('core', 'cronErrors', ''), true), + 'cronErrors' => $this->getCronErrors(), 'serverHasInternetConnection' => $this->isInternetConnectionWorking(), 'isMemcacheConfigured' => $this->isMemcacheConfigured(), 'memcacheDocs' => $this->urlGenerator->linkToDocs('admin-performance'), |