From 4c1fed3e54a63bc9b08b37188ce23eb7ff0ad0cb Mon Sep 17 00:00:00 2001 From: Uwe Tesche Date: Mon, 18 Jul 2022 14:49:42 +0200 Subject: [PATCH] rule_id must be (int) Otherwise: [b0q8i] [2022-07-18 13:20:20.524276] unibw_root.ERROR: Whoops\Handler\CallbackHandler::handle:370 0 Argument 1 passed to ilLDAPRoleAssignmentRule::_getInstanceByRuleId() must be of the type int, string given, called in /.../Services/LDAP/classes/class.ilLDAPRoleAssignmentRules.php on line 103 in /.../Services/LDAP/classes/class.ilLDAPRoleAssignmentRule.php:62#0 /.../Services/LDAP/classes/class.ilLDAPRoleAssignmentRules.php(103): ilLDAPRoleAssignmentRule::_getInstanceByRuleId() #1 /.../Services/LDAP/classes/class.ilLDAPAttributeToUser.php(140): ilLDAPRoleAssignmentRules::getAssignmentsForUpdate() #2 /.../Services/LDAP/classes/class.ilLDAPAttributeToUser.php(203): ilLDAPAttributeToUser->parseRoleAssignmentsForUpdate() --- Services/LDAP/classes/class.ilLDAPRoleAssignmentRules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Services/LDAP/classes/class.ilLDAPRoleAssignmentRules.php b/Services/LDAP/classes/class.ilLDAPRoleAssignmentRules.php index 6ee7e0a34a20..faa3d09fbbb6 100644 --- a/Services/LDAP/classes/class.ilLDAPRoleAssignmentRules.php +++ b/Services/LDAP/classes/class.ilLDAPRoleAssignmentRules.php @@ -100,7 +100,7 @@ public static function getAssignmentsForUpdate(int $a_server_id, $a_usr_id, $a_u $res = $ilDB->query($query); $roles = []; while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) { - $rule = ilLDAPRoleAssignmentRule::_getInstanceByRuleId($row->rule_id); + $rule = ilLDAPRoleAssignmentRule::_getInstanceByRuleId((int) $row->rule_id); $matches = $rule->matches($a_usr_data); if ($matches && $row->add_on_update) {