diff --git a/core/lib/Drupal/Core/Cache/Context/QueryArgsCacheContext.php b/core/lib/Drupal/Core/Cache/Context/QueryArgsCacheContext.php index a0f817f..fca0dd1 100644 --- a/core/lib/Drupal/Core/Cache/Context/QueryArgsCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/QueryArgsCacheContext.php @@ -30,12 +30,11 @@ public static function getLabel() { */ public function getContext($query_arg = NULL) { if ($query_arg === NULL) { - $query_string = $this->requestStack->getCurrentRequest()->getQueryString(); - return (string) $query_string; + return (string) $this->requestStack->getCurrentRequest()->getQueryString(); } $value = $this->requestStack->getCurrentRequest()->query->get($query_arg, NULL, TRUE); - return (string) http_build_query([$query_arg => $value], '', '&'); + return http_build_query([$query_arg => $value], '', '&'); } /**