Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fixed indentation
Signed-off-by: Dries Mys <[email protected]>
  • Loading branch information
m7913d committed Jun 5, 2021
commit 644cb4154b423bfbf7562928ac3841a1644cdc98
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ public function addGroup(string $groupid, string $displayname = ''): DataRespons
}
$group = $this->groupManager->createGroup($groupid);
if ($displayname !== '') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also check if not null

Copy link
Member

@blizzz blizzz May 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for null, the parameter list needs to be adjusted. but it might be that null is passed when displayname was not provided by the client - at least i believe to remember, but didn't doublecheck. Integration tests pass, should be ok

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just repeating what psalm is saying 😉 🦜

Copy link
Contributor Author

@m7913d m7913d Jun 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skjnldsv I added a null check and I throw an exception if it is the case. However, this results in a failure of the nodb test (see continuous integration). Shouldn't I throw an exception in this case or is the failing nodb test wrong? It seems to me appropriate that an error message is returned in case the group creation failed.

$group->setDisplayName($displayname);
$group->setDisplayName($displayname);
}
return new DataResponse();
}
Expand Down