From b7b632b36888bd0590bed4ecec98ddb1f46d7315 Mon Sep 17 00:00:00 2001 From: Lukas Kahwe Smith Date: Sun, 8 Mar 2020 18:39:12 +0100 Subject: [PATCH] fix regression ntroduced in d82266a8c496fc51fd4b86881e860d46faa51f17 `Only variables should be passed by reference` due to using the return if `reset()` as a method parameter --- src/Middleware/SetLocale.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Middleware/SetLocale.php b/src/Middleware/SetLocale.php index 9760b0a..509324f 100644 --- a/src/Middleware/SetLocale.php +++ b/src/Middleware/SetLocale.php @@ -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')); }