Check for null value to avoid TypeError in the group manager
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -308,6 +308,10 @@ class PermissionService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function canCreate() {
|
public function canCreate() {
|
||||||
|
if ($this->userId === null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$groups = $this->getGroupLimitList();
|
$groups = $this->getGroupLimitList();
|
||||||
if (count($groups) === 0) {
|
if (count($groups) === 0) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user