Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/bref-local
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ try {
}

try {
$event = $data ? json_decode($data, true, 512, JSON_THROW_ON_ERROR) : null;
// Note: don't use `$data ?` because the valid JSON event `"0"` is a falsy string
$event = ($data !== null && $data !== '') ? json_decode($data, true, 512, JSON_THROW_ON_ERROR) : null;
} catch (JsonException $e) {
error_log('The JSON provided for the event data is invalid JSON.');
exit(1);
Expand Down
Loading