diff --git a/core/includes/common.inc b/core/includes/common.inc index 96fd1e6..0c6547b 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -2185,9 +2185,10 @@ function url_is_active($path, $options = array()) { // query parameters of the url equal those of the current request, since the // same request with different query parameters may yield a different page // (e.g., pagers). + $path_query = drupal_container()->get('request')->query->all(); $path_match = ($path == current_path() || ($path == '' && drupal_is_front_page())); $lang_match = (empty($options['language']) || $options['language']->langcode == language(LANGUAGE_TYPE_URL)->langcode); - $query_match = (drupal_container()->get('request')->query->all() == $options['query']); + $query_match = (empty($options['query']) && empty($path_query)) || ($options['query'] == $path_query); return $path_match && $lang_match && $query_match; }