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 1427a4e commit a3eb6cfCopy full SHA for a3eb6cf
README.md
@@ -35,7 +35,7 @@ if ($content === false) {
35
throw new FileLoadingException('Could not load file foobar.json');
36
}
37
$foobar = json_decode($content);
38
-if ($foobar === null) {
+if (json_last_error() !== JSON_ERROR_NONE) {
39
throw new FileLoadingException('foobar.json does not contain valid JSON: '.json_last_error());
40
41
```
0 commit comments