Prevent error if no input is given in create actions

This commit is contained in:
Toby Zerner
2015-11-23 14:15:30 +10:30
parent a61929730e
commit 262a934747
4 changed files with 4 additions and 4 deletions

View File

@ -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