Skip to content

Commit 1e9d506

Browse files
committed
Validate locale earlier
(cherry picked from commit 129700e)
1 parent 4df0fdd commit 1e9d506

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
@@ -159,6 +159,8 @@ public function resetMessages($locale = null)
159159
return true;
160160
}
161161

162+
$this->assertValidLocale($locale);
163+
162164
foreach ($this->getDirectories() as $directory) {
163165
$data = @include sprintf('%s/%s.php', rtrim($directory, '\\/'), $locale);
164166

0 commit comments

Comments
 (0)