datainjection
datainjection copied to clipboard
Fix injection of not null fields
Checklist before requesting a review
- [x] I have performed a self-review of my code.
- [ ] I have added tests (when available) that prove my fix is effective or that my feature works.
- [ ] I have updated the CHANGELOG with a short functional description of the fix or new feature.
Description
- It fixes #539 & !40013
- When trying to inject data into the
glpi_userstable, fields with empty values that are defined asNOT NULLin the database do not take their assigned default values. The fix simply fills the isNullable() function in the corresponding class with the fields that can be null, allowing the plugin to distinguishNOT NULLfields and ensure they comply with their database constraints.
As discussed before with @lainow:
@stonebuzz @Rom1-B would it be better to fix that in all classes in the PR ? I need a fix for the client but the problem will probably happen again with another class.