aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/settings/lib')
-rw-r--r--apps/settings/lib/Controller/CheckSetupController.php4
-rw-r--r--apps/settings/lib/SetupChecks/CodeIntegrity.php9
2 files changed, 12 insertions, 1 deletions
diff --git a/apps/settings/lib/Controller/CheckSetupController.php b/apps/settings/lib/Controller/CheckSetupController.php
index 5cf48d38ffb..d4e05ec90e4 100644
--- a/apps/settings/lib/Controller/CheckSetupController.php
+++ b/apps/settings/lib/Controller/CheckSetupController.php
@@ -85,6 +85,10 @@ class CheckSetupController extends Controller {
$completeResults = $this->checker->getResults();
+ if ($completeResults === null) {
+ return new DataDisplayResponse('Integrity checker has not been run. Integrity information not available.');
+ }
+
if (!empty($completeResults)) {
$formattedTextResponse = 'Technical information
=====================
diff --git a/apps/settings/lib/SetupChecks/CodeIntegrity.php b/apps/settings/lib/SetupChecks/CodeIntegrity.php
index dc29c4da306..2b4271fae9c 100644
--- a/apps/settings/lib/SetupChecks/CodeIntegrity.php
+++ b/apps/settings/lib/SetupChecks/CodeIntegrity.php
@@ -33,7 +33,14 @@ class CodeIntegrity implements ISetupCheck {
public function run(): SetupResult {
if (!$this->checker->isCodeCheckEnforced()) {
return SetupResult::info($this->l10n->t('Integrity checker has been disabled. Integrity cannot be verified.'));
- } elseif ($this->checker->hasPassedCheck()) {
+ }
+
+ // If there are no results we need to run the verification
+ if ($this->checker->getResults() === null) {
+ $this->checker->runInstanceVerification();
+ }
+
+ if ($this->checker->hasPassedCheck()) {
return SetupResult::success($this->l10n->t('No altered files'));
} else {
return SetupResult::error(