|Summary:||Error when adding a patron with email address|
|Product:||Koha||Reporter:||Joy Nelson <joy>|
|Component:||Patrons||Assignee:||Kyle M Hall <kyle.m.hall>|
|Status:||CLOSED FIXED||QA Contact:|
|Priority:||P5 - low||CC:||chris, gmcharlt, julian.maurice, paul.poulain|
|Change sponsored?:||---||Patch complexity:||---|
|Documentation contact:||Documentation submission:|
|Text to go in the release notes:||Version(s) released in:|
Bug 8057 - Error when adding a patron with email address
[SIGNED-OFF] Bug 8057 - Error when adding a patron with email address
Description Joy Nelson 2012-05-07 22:28:16 UTC
Adding a new patron with an email address results in the following error: Can't use string ("1") as a HASH ref while "strict refs" in use at /home/load02/kohaclone/members/memberentry.pl line 357. Patrons without an email address do not cause this error.
Comment 1 Joy Nelson 2012-05-07 22:49:01 UTC
Patron was added with surname, firstname, primary email address, username, and password.
Comment 2 Joy Nelson 2012-05-07 22:58:42 UTC
This error does not occur when the "AutoEmailOpacUser" is set to Don't Send. When it is set to Send, the warning appears.
Comment 3 Kyle M Hall 2012-05-08 19:50:19 UTC Comment hidden (obsolete)
Created attachment 9466 [details] [review] Bug 8057 - Error when adding a patron with email address Caused by code assuming a the variable $err is a hashref when it is only a hashref if there is an error.
Comment 4 Julian Maurice 2012-05-11 13:52:27 UTC
Created attachment 9512 [details] [review] [SIGNED-OFF] Bug 8057 - Error when adding a patron with email address I was able to reproduce the bug in master. The patch fix it: signed off.
Comment 5 Paul Poulain 2012-05-22 10:20:58 UTC
QA comment: * julian, you forgot to add your signature when uploading the [SIGNED-OFF] patch, i've added it * tiny patch, passed QA (note i'm not an addict of the ref($err) eq "HASH", but can't argue more than "i don't like it" so won't refuse pushing)
Comment 6 Kyle M Hall 2012-05-22 12:15:44 UTC
Paul, if you can recommend a better way to accomplish this, I'd be willing to write a replacement or followup patch. I believe there is a perl module for this type of thing, but I'm having trouble locating it. (In reply to comment #5) > QA comment: > * julian, you forgot to add your signature when uploading the [SIGNED-OFF] > patch, i've added it > * tiny patch, passed QA (note i'm not an addict of the ref($err) eq "HASH", > but can't argue more than "i don't like it" so won't refuse pushing)
Comment 7 Chris Cormack 2012-05-23 21:48:17 UTC
Valid bugfix, fixes a nasty error, pushed to stable will be in 3.8.2