diff --git a/core/modules/contact/src/Plugin/Block/ContactNavigationBlock.php b/core/modules/contact/src/Plugin/Block/ContactNavigationBlock.php index 9f0c22e..9e961f3 100644 --- a/core/modules/contact/src/Plugin/Block/ContactNavigationBlock.php +++ b/core/modules/contact/src/Plugin/Block/ContactNavigationBlock.php @@ -145,9 +145,7 @@ public function blockForm($form, FormStateInterface $form_state) { // Display only selected forms by default if there are any. $row_display = isset($contact_forms[$id]); // Find lowest weight to display selected forms first. - if ($min_weight > $row_weight) { - $min_weight = $row_weight; - } + $min_weight = min($min_weight, $row_weight); } $row = [ 'label' => ['#markup' => String::checkPlain($row_label)],