Skip to content

Commit

Permalink
[5.2] Translation - simplifies the parseLocale() method (#13244)
Browse files Browse the repository at this point in the history
  • Loading branch information
KennedyTedesco authored and taylorotwell committed Apr 21, 2016
1 parent 934c915 commit 0d356a6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Illuminate/Translation/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,7 @@ public function parseKey($key)
*/
protected function parseLocale($locale)
{
if (! is_null($locale)) {
return array_filter([$locale, $this->fallback]);
}

return array_filter([$this->locale, $this->fallback]);
return array_filter([$locale ?: $this->locale, $this->fallback]);
}

/**
Expand Down

0 comments on commit 0d356a6

Please sign in to comment.