Skip to content

Commit

Permalink
fix regression ntroduced in d82266a
Browse files Browse the repository at this point in the history
`Only variables should be passed by reference` due to using the return if `reset()` as a method parameter
  • Loading branch information
lsmith77 authored Mar 8, 2020
1 parent 656326e commit b7b632b
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()));
$language = reset($agent->languages());
$this->setLocale($language);
} else {
$this->setLocale(config('app.locale'));
}
Expand Down

0 comments on commit b7b632b

Please sign in to comment.