Skip to content

Commit

Permalink
fix for undefined property in SetupController [fixes #3774]
Browse files Browse the repository at this point in the history
  • Loading branch information
diegosouza committed Sep 8, 2019
1 parent e8fb2b7 commit f800c3a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/Http/Controllers/SetupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,18 +134,21 @@ public function __construct()
*/
public function getIndex()
{
$supportedLanguages = Request::getLanguages();
$requestedLanguages = Request::getLanguages();
$userLanguage = Config::get('app.locale');
$langs = Config::get('langs');

foreach ($supportedLanguages as $language) {
foreach ($requestedLanguages as $language) {
$language = str_replace('_', '-', $language);

if (isset($this->langs[$language])) {
if (isset($langs[$language])) {
$userLanguage = $language;
break;
}
}

app('translator')->setLocale($userLanguage);

// Since .env may already be configured, we should show that data!
$cacheConfig = [
'driver' => Config::get('cache.default'),
Expand Down

0 comments on commit f800c3a

Please sign in to comment.