Skip to content

Commit

Permalink
Merge pull request #21 from lsmith77/patch-1
Browse files Browse the repository at this point in the history
fix regression introduced in d82266a
  • Loading branch information
denisdulici authored Mar 9, 2020
2 parents 656326e + b7b632b commit 4fdfb07
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Middleware/SetLocale.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public function setDefaultLocale()
if (config('language.auto')) {
$agent = new Agent();

$this->setLocale(reset($agent->languages()));

This comment has been minimized.

Copy link
@Surt

Surt Mar 9, 2020

It shows error since reset receives an array as `reference, so it must be a variable.

$languages = $agent->languages();
$this->setLocale(reset($languages));
$language = reset($agent->languages());
$this->setLocale($language);
} else {
$this->setLocale(config('app.locale'));
}
Expand Down

0 comments on commit 4fdfb07

Please sign in to comment.