diff --git a/core/includes/menu.inc b/core/includes/menu.inc index 83c842c..0dfa355 100644 --- a/core/includes/menu.inc +++ b/core/includes/menu.inc @@ -1746,11 +1746,11 @@ function theme_menu_local_action($variables) { // @todo Remove this check and the call to l() when all pages are converted to // routes. // @todo Figure out how to support local actions without a href properly. - if ($link['href'] !== '') { - $output .= l($link['title'], $link['href'], $link['localized_options']); + if ($link['href'] === '' && !empty($link['route_name'])) { + $output .= Drupal::l($link['title'], $link['route_name'], $link['route_parameters'], $link['localized_options']); } else { - $output .= Drupal::l($link['title'], $link['route_name'], $link['route_parameters'], $link['localized_options']); + $output .= l($link['title'], $link['href'], $link['localized_options']); } $output .= "";