Bugzilla – Attachment 153587 Details for
Bug 34280
Patrons with no email address produce a warning when saving
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34280: Fix warning in logs when saving patron details
Bug-34280-Fix-warning-in-logs-when-saving-patron-d.patch (text/plain), 1.28 KB, created by
David Nind
on 2023-07-18 10:57:14 UTC
(
hide
)
Description:
Bug 34280: Fix warning in logs when saving patron details
Filename:
MIME Type:
Creator:
David Nind
Created:
2023-07-18 10:57:14 UTC
Size:
1.28 KB
patch
obsolete
>From d71e27b0737bd45c4558e934f305b8f0671215a6 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Fri, 14 Jul 2023 14:11:28 +0000 >Subject: [PATCH] Bug 34280: Fix warning in logs when saving patron details > >If a patron has no valid email address then a warning message appears in the logs when saving: > >"Use of uninitialized value $email in string ne at /kohadevbox/koha/Koha/Patron.pm line 1445." > >This patch fixes that error by removing an unnescessary string ne > >Test plan: >1) Create/choose a patron with no email addresses >2) On the patron record in the page section for Contact information, click edit >3) Now click save >4) The warning above should appear in the logs >5) Apply patch >6) Repeat steps 2 and 3 >7) The warning should no longer appear > >Signed-off-by: David Nind <david@davidnind.com> >--- > Koha/Patron.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index 2a8eecf9f6..4a29c76f80 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -1442,7 +1442,7 @@ sub first_valid_email_address { > C4::Context->preference('EmailFieldPrecedence'); > for my $field (@fields) { > $email = $self->$field; >- last if ( $email ne q{} ); >+ last if ( $email ); > } > > return $email; >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34280
:
153490
|
153587
|
153852
|
153853