From 2771bba5dc91242cca2dcce2f7ce79c268c15779 Mon Sep 17 00:00:00 2001 From: Stefan Hagspiel Date: Fri, 22 Sep 2023 20:36:53 +0200 Subject: [PATCH] fix request fetch (#143) --- src/Helper/UserHelper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Helper/UserHelper.php b/src/Helper/UserHelper.php index 4371578..40b965e 100644 --- a/src/Helper/UserHelper.php +++ b/src/Helper/UserHelper.php @@ -22,13 +22,13 @@ public function __construct( public function getLanguagesAcceptedByUser(): array { - $masterRequest = $this->requestStack->getMainRequest(); - if (!$masterRequest instanceof Request) { + $mainRequest = $this->requestStack->getMainRequest(); + if (!$mainRequest instanceof Request) { return []; } $guessedLanguages = []; - $acceptLanguages = $masterRequest->getLanguages(); + $acceptLanguages = $mainRequest->getLanguages(); if (!is_array($acceptLanguages)) { return $guessedLanguages;