Skip to content
Snippets Groups Projects

#3267588: Check if the original severity exists before comparing it, to avoid the notice

1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -21,7 +21,7 @@ function trusted_reverse_proxy_preprocess_status_report_page(&$variables) {
$container = \Drupal::getContainer();
$severity = $container->getParameter('trusted_reverse_proxy');
$originalSeverity = $variables['requirements']['#requirements']['trusted_host_patterns']['severity'];
$originalSeverity = $variables['requirements']['#requirements']['trusted_host_patterns']['severity'] ?? NULL;
if ($originalSeverity !== $severity['severity']) {
$variables['requirements']['#requirements']['trusted_host_patterns']['severity'] = $severity['severity'];
// Mock an element for rendering to retrieve the counters.
Loading