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.
Patron was added with surname, firstname, primary email address, username, and password.
This error does not occur when the "AutoEmailOpacUser" is set to Don't Send. When it is set to Send, the warning appears.
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.
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.
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)
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)
Valid bugfix, fixes a nasty error, pushed to stable will be in 3.8.2