public function ErrorReporting::run in Security Review 8
The actual procedure of carrying out the check.
Return value
\Drupal\security_review\CheckResult The result of running the check.
Overrides Check::run
File
- src/
Checks/ ErrorReporting.php, line 31
Class
- ErrorReporting
- Defines a security check that checks the error reporting setting.
Namespace
Drupal\security_review\ChecksCode
public function run() {
// Get the error level.
$error_level = $this
->configFactory()
->get('system.logging')
->get('error_level');
// Determine the result.
if (is_null($error_level) || $error_level != 'hide') {
$result = CheckResult::FAIL;
}
else {
$result = CheckResult::SUCCESS;
}
return $this
->createResult($result, [
'level' => $error_level,
]);
}