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 414eb29 commit dfeb1b8Copy full SHA for dfeb1b8
src/Utility/Language.php
@@ -90,7 +90,9 @@ public function getTranslationsByLanguage(string $language): array
90
$fileContent = $file->fread($file->getSize());
91
92
/** @todo PHP ^7.3 JSON_THROW_ON_ERROR */
93
- if (($decoded = \json_decode($fileContent, true)) === null) {
+ $decoded = \json_decode($fileContent, true);
94
+
95
+ if (\json_last_error() !== \JSON_ERROR_NONE) {
96
throw new \Exception("Fail to decode JSON file: {$filePath}");
97
}
98
0 commit comments