Skip to content

Commit

Permalink
Merge pull request #3775 from diegosouza/fix_3744_issue
Browse files Browse the repository at this point in the history
fix for undefined property in SetupController [fixes #3774]
  • Loading branch information
jbrooksuk committed Sep 18, 2019
2 parents a93292c + f800c3a commit f4bb1c0
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 f4bb1c0

Please sign in to comment.