Skip to content

Commit 4f6363d

Browse files
author
Pavel Babushkin
authored
Merge pull request #14 from NBZ4live/hotfix/get_array_request_fails_when_no_params_in_call
Set default value in JsonRpcController::getArrayRequest() to fix missing params
2 parents 8bb967e + 54dcc8b commit 4f6363d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Traits/JsonRpcController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ trait JsonRpcController
2121
protected function getArrayRequest(): array
2222
{
2323
if (null === $this->arrayRequest) {
24-
return ArrayHelper::fromObject($this->getRequest()->call->params);
24+
return ArrayHelper::fromObject($this->getRequest()->call->params ?? []);
2525
}
2626

2727
return $this->arrayRequest;

0 commit comments

Comments
 (0)