mirror of
https://github.com/flarum/framework.git
synced 2025-06-04 23:14:32 +08:00
Prevent error if no input is given in create actions
This commit is contained in:
@ -55,7 +55,7 @@ class CreateDiscussionController extends AbstractCreateController
|
||||
$actor = $request->getAttribute('actor');
|
||||
|
||||
$discussion = $this->bus->dispatch(
|
||||
new StartDiscussion($actor, array_get($request->getParsedBody(), 'data'))
|
||||
new StartDiscussion($actor, array_get($request->getParsedBody(), 'data', []))
|
||||
);
|
||||
|
||||
// After creating the discussion, we assume that the user has seen all
|
||||
|
Reference in New Issue
Block a user