ATM-Consulting / dolibarr_module_abricot

Collection de fonctions ATM pour module Dolibarr
Other
25 stars 50 forks source link

Prevent error on replaceCommon and notnull #196

Open camlafit opened 9 months ago

camlafit commented 9 months ago

Hi

At https://github.com/ATM-Consulting/dolibarr_module_abricot/blob/main/includes/class/class.seedobject.php#L1490 test looks incomplete

We can raise an warning/error if notnull key is unset. Could be nice to replace by :

                        if (isset($this->fields[$key]['notnull']) && $this->fields[$key]['notnull'] == 1 && empty($values[$key]))
atm-florianm commented 6 months ago

Hi, what function should your test go in? The line numbers have changed since your issue was opened, so L1490 no longer seems to be the line you were targeting.