Skip to content

Commit d3bb072

Browse files
committed
Params is optional
1 parent 11f1dcc commit d3bb072

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/React/Decoder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public function handleData($input)
118118
if (isset($data['id']) || array_key_exists('id', $data)) {
119119
$jsonrpc = new Request($data['method'], $data['params'] ?? [], $data['id']);
120120
} else {
121-
$jsonrpc = new Notification($data['method'], $data['params']);
121+
$jsonrpc = new Notification($data['method'], $data['params'] ?? []);
122122
}
123123
} elseif (isset($data['result'])) {
124124
$jsonrpc = new Response($data['id'], $data['result']);

0 commit comments

Comments
 (0)