From 62fff9480826f8e5dc9d79a98c9f13e4bd780ea4 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 1 Jun 2015 15:16:03 +0200 Subject: [PATCH] DbUserGroupBackend: Do not try to fetch a group id for null refs #8826 --- .../Icinga/Authentication/UserGroup/DbUserGroupBackend.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/Icinga/Authentication/UserGroup/DbUserGroupBackend.php b/library/Icinga/Authentication/UserGroup/DbUserGroupBackend.php index e77d50f78..fd1228065 100644 --- a/library/Icinga/Authentication/UserGroup/DbUserGroupBackend.php +++ b/library/Icinga/Authentication/UserGroup/DbUserGroupBackend.php @@ -208,8 +208,8 @@ class DbUserGroupBackend extends DbRepository implements UserGroupBackendInterfa */ protected function persistGroupId($groupName) { - if (is_int($groupName)) { - return $groupName; // It's obviously already an id + if (! $groupName || is_int($groupName)) { + return $groupName; // It's obviously already an id or NULL } $groupId = $this->ds