Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add null check for AssignedOrguPosition before assigning. #11

Merged

Conversation

thomas-neumann-axtesys
Copy link
Contributor

Add a null check of the AssignedOrguPosition before calling the findOrCreateAssignment function to prevent the creation of erroneous entries to "il_orgu_ua" with position_id = 0 when AssignedOrguPosition is null.

This fix was created for a ILIAS 7 Installation that experienced a bug where UserDefaults created entries in the User-Org-Assignment table (il_orgu_ua) with position_id = 0, which does not exist. The reason for position 0 is the typecast in line 1555 to int, where null was typecast to 0 and inserted.

Add a null check of the AssignedOrguPosition before calling the findOrCreateAssignment function to prevent the creation of erroneous entries to "il_orgu_ua" with position_id = 0.
@mstuder
Copy link
Member

mstuder commented Nov 24, 2023

thanks for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants