Skip to content

Commit

Permalink
Validate locale earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekatarnls committed Dec 27, 2024
1 parent f01cfa9 commit 129700e
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 @@ -157,6 +157,8 @@ public function resetMessages(?string $locale = null): bool
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 129700e

Please sign in to comment.