Skip to content

Mantis #47008 Prevent writing null to xml for non required fields#10510

Draft
laurinoetterli wants to merge 2 commits intoILIAS-eLearning:release_9from
laurinoetterli:release_9_prevent_null
Draft

Mantis #47008 Prevent writing null to xml for non required fields#10510
laurinoetterli wants to merge 2 commits intoILIAS-eLearning:release_9from
laurinoetterli:release_9_prevent_null

Conversation

@laurinoetterli
Copy link

If any not required field contains null, this throws an exception. It is fixed by writing a default value to the xml if it is null.

@dsstrassner
Copy link
Contributor

dsstrassner commented Nov 28, 2025

Hi @laurinoetterli, please look at our documentation. If this is a bug fix, we need a Mantis issue link. Otherwise this is an improvement, and then other rules apply.
Thanks for your contribution!

@mjansenDatabay
Copy link
Contributor

Hi @GitHamo ,

we leave it up to you how to proceed with this PR. As @dsstrassner mentioned above, bugfixes usually need a corresponding Mantis issue.

Best regards,
Michael

@GitHamo
Copy link
Contributor

GitHamo commented Jan 26, 2026

Hey everyone, I have created a Mantis ticket for the issue and added the PR to it. Please update the PR info and let me know if the ticket description is invalid.

Now, since this is only for release_9, but the issue is also in further releases, which will be supported longer than version 9, similar PRs for release_10, release_11 & trunk branches should be created.

@laurinoetterli Thank you for your contributions.

In some cases(if a user was deleted) these fields also might be null.
@laurinoetterli
Copy link
Author

After some more testing i have found, that the login, firstname and lastname fields also might be null if the user was deleted.

@laurinoetterli laurinoetterli changed the title Prevent writing null to xml for non required fields Mantis #47008 Prevent writing null to xml for non required fields Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants