Skip to content

Commit

Permalink
Merge pull request #36 from moufmouf/readm_fix
Browse files Browse the repository at this point in the history
Fixing json_decode error handling in README
  • Loading branch information
moufmouf authored Sep 14, 2018
2 parents 1427a4e + ccf6f0f commit 98b773f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ if ($content === false) {
throw new FileLoadingException('Could not load file foobar.json');
}
$foobar = json_decode($content);
if ($foobar === null) {
throw new FileLoadingException('foobar.json does not contain valid JSON: '.json_last_error());
if (json_last_error() !== JSON_ERROR_NONE) {
throw new FileLoadingException('foobar.json does not contain valid JSON: '.json_last_error_msg());
}
```

Expand Down
2 changes: 1 addition & 1 deletion generated/sem.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function msg_queue_exists(int $key): void
* of the queue is returned. If desiredmsgtype is
* greater than 0, then the first message of that type is returned.
* If desiredmsgtype is less than 0, the first
* message on the queue with the lowest type less than or equal to the
* message on the queue with a type less than or equal to the
* absolute value of desiredmsgtype will be read.
* If no messages match the criteria, your script will wait until a suitable
* message arrives on the queue. You can prevent the script from blocking
Expand Down

0 comments on commit 98b773f

Please # to comment.