We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bbe6b5b commit 4779bccCopy full SHA for 4779bcc
src/GettextPOGenerator.php
@@ -180,6 +180,9 @@ private function addStringsFromJsonFiles($translations)
180
// Load each JSON file to get source strings
181
foreach ($this->JsonFiles() as $jsonFile) {
182
$jsonTranslations = json_decode(file_get_contents($jsonFile), true);
183
+ if (!is_array($jsonTranslations)) {
184
+ throw new \Exception("The file '$jsonFile' is not valid JSON.'");
185
+ }
186
187
foreach ($jsonTranslations as $key => $value) {
188
$sourceStrings[] = $key;
0 commit comments