Skip to content

Commit 129700e

Browse files
committed
Validate locale earlier
1 parent f01cfa9 commit 129700e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Carbon/AbstractTranslator.php

+2
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ public function resetMessages(?string $locale = null): bool
157157
return true;
158158
}
159159

160+
$this->assertValidLocale($locale);
161+
160162
foreach ($this->getDirectories() as $directory) {
161163
$data = @include \sprintf('%s/%s.php', rtrim($directory, '\\/'), $locale);
162164

0 commit comments

Comments
 (0)