diff --git a/core/modules/update/update.install b/core/modules/update/update.install
index c616412ac4..e7a2636187 100644
--- a/core/modules/update/update.install
+++ b/core/modules/update/update.install
@@ -107,19 +107,22 @@ function _update_requirement_check($project, $type) {
$status = $project['status'];
if ($status != UPDATE_CURRENT) {
$requirement['reason'] = $status;
$requirement['severity'] = REQUIREMENT_ERROR;
- // Append the available updates link to the message from
+ // When updates are available,
+ // append the available updates link to the message from
// _update_message_text(), and format the two translated strings together in
// a single paragraph.
$requirement['description'][] = ['#markup' => _update_message_text($type, $status)];
+ if (!in_array($status, [UPDATE_UNKNOWN, UPDATE_NOT_CHECKED, UPDATE_NOT_FETCHED, UPDATE_FETCH_PENDING])) {
if (_update_manager_access()) {
$requirement['description'][] = ['#prefix' => ' ', '#markup' => t('See the available updates page for more information and to install your missing updates.', [':available_updates' => \Drupal::url('update.report_update')])];
}
else {
$requirement['description'][] = ['#prefix' => ' ', '#markup' => t('See the available updates page for more information.', [':available_updates' => \Drupal::url('update.status')])];
}
}
+ }
switch ($status) {
case UPDATE_NOT_SECURE:
$requirement_label = t('Not secure!');
break;
@@ -135,8 +138,9 @@ function _update_requirement_check($project, $type) {
break;
case UPDATE_UNKNOWN:
case UPDATE_NOT_CHECKED:
case UPDATE_NOT_FETCHED:
+ case UPDATE_FETCH_PENDING:
$requirement_label = isset($project['reason']) ? $project['reason'] : t('Can not determine status');
$requirement['severity'] = REQUIREMENT_WARNING;
break;
default: