UPDATE systempreferences SET value='' WHERE variable='EmailFieldPrimary';
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37757 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170842|0 |1 is obsolete| | --- Comment #7 from David Nind <david@davidnind.com> --- Created attachment 171162 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171162&action=edit Bug 37757: Make notice_email_address() handle EmailFieldPrimary values more robustly This patchset makes: * The EmailFieldPrimary value 'OFF' be replaced by an empty string * Koha::Patron->notice_email_address() handle the empty case more gracefully To test: 1. On main, manually set the EmailFieldPrimary syspref to empty $ ktd --shell k$ koha-mysql kohadev 2. Enable `AutoEmailNewUser` 3. Create a new user => FAIL: Koha explodes like: ``` The method Koha::Patron-> is not covered by tests! Trace begun at /kohadevbox/koha/Koha/Object.pm line 992 Koha::Object::AUTOLOAD('Koha::Patron=HASH(0xaaaae37ac550)') called at /kohadevbox/koha/Koha/Patron.pm line 1662 Koha::Patron::notice_email_address('Koha::Patron=HASH(0xaaaae37ac550)') called at /kohadevbox/koha/members/memberentry.pl line 448 ... 4. Apply this patches 5. Run: k$ updatedatabase => SUCCESS: Update succeeds 6. Restart all and retry creating a patron => SUCCESS: It worked! 7. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.