If cronErros is empty json_decode will return NULL

Fixes #9867

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
pull/9920/head
Roeland Jago Douma 6 years ago
parent c3aea9cdf6
commit 3cbe40ffac
No known key found for this signature in database
GPG Key ID: F941078878347C0C

@ -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'),

Loading…
Cancel
Save