Skip to content

Commit

Permalink
Merge pull request #1044 from City-of-Helsinki/UHF-10424-match-missin…
Browse files Browse the repository at this point in the history
…g-default-case

UHF-10424: Fix match statement in hdbt_preprocess_feed_icon
  • Loading branch information
hyrsky authored Aug 21, 2024
2 parents 2d3d31c + b9a0581 commit c02b0b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hdbt.theme
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,9 @@ function hdbt_preprocess_feed_icon(&$variables): void {
return;
}

$variables['title'] = match(strtolower($variables['title'])) {
'news', 'nyheter', 'uutiset' => t('all news', [], ['context' => 'Feed icon altered title'])
};
if (in_array(strtolower($variables['title']), ['news', 'nyheter', 'uutiset'])) {
$variables['title'] = t('all news', [], ['context' => 'Feed icon altered title']);
}
}

/**
Expand Down

0 comments on commit c02b0b7

Please sign in to comment.