Skip to content

Commit

Permalink
fix request fetch (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
solverat authored Sep 22, 2023
1 parent 791e78e commit 2771bba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Helper/UserHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2771bba

Please sign in to comment.