- Issue created by @joachim
The code in StatusReport::preRenderGroupRequirements() is hard to read:
$severity = $severities[REQUIREMENT_INFO];
if (isset($requirement['severity'])) {
$requirement_severity = (int) $requirement['severity'] === REQUIREMENT_OK ? REQUIREMENT_INFO : (int) $requirement['severity'];
$severity = $severities[$requirement_severity];
}
elseif (defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'install') {
$severity = $severities[REQUIREMENT_OK];
}
What's actually happening here is:
1. If $requirement['severity'] is set, we use that.
2. If it's not then we use either:
-- REQUIREMENT_OK if we're in install
-- REQUIREMENT_INFO if not
But the default handling is split in two parts of the code which makes it confusing.