From 75e69958f24dcc817842ff7516e11a00532d3771 Mon Sep 17 00:00:00 2001 From: Uwe Tesche Date: Mon, 18 Jul 2022 16:09:38 +0200 Subject: [PATCH] bugfix: passed 'rule_id' MUST be of type int otherwise a TypeError Exception is raised: TypeError thrown with message "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" Stacktrace: #14 TypeError in /.../Services/LDAP/classes/class.ilLDAPRoleAssignmentRule.php:62 #13 ilLDAPRoleAssignmentRule:_getInstanceByRuleId in /.../Services/LDAP/classes/class.ilLDAPRoleAssignmentRules.php:103 #12 ilLDAPRoleAssignmentRules:getAssignmentsForUpdate in /.../Services/LDAP/classes/class.ilLDAPAttributeToUser.php:140 --- 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) {