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 234241c commit f1290a6Copy full SHA for f1290a6
src/GettextPOGenerator.php
@@ -165,6 +165,9 @@ private function addStringsFromJsonFiles($translations) {
165
// Load each JSON file to get source strings
166
foreach ($this->JsonFiles() as $jsonFile) {
167
$jsonTranslations = json_decode(file_get_contents($jsonFile), true);
168
+ if (!is_array($jsonTranslations)) {
169
+ throw new \Exception("The file '$jsonFile' is not valid JSON.'");
170
+ }
171
172
foreach ($jsonTranslations as $key => $value) {
173
$sourceStrings[] = $key;
0 commit comments