Skip to content

Commit

Permalink
Validate locale earlier
Browse files Browse the repository at this point in the history
(cherry picked from commit 129700e)
  • Loading branch information
kylekatarnls committed Dec 27, 2024
1 parent 4df0fdd commit 1e9d506
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Carbon/AbstractTranslator.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ public function resetMessages($locale = null)
return true;
}

$this->assertValidLocale($locale);

foreach ($this->getDirectories() as $directory) {
$data = @include sprintf('%s/%s.php', rtrim($directory, '\\/'), $locale);

Expand Down

0 comments on commit 1e9d506

Please sign in to comment.