Bugzilla – Attachment 184144 Details for
Bug 40410
Letters.t generates a warning
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40410: Remove warning from Letters.
Bug-40410-Remove-warning-from-Letters.patch (text/plain), 1.43 KB, created by
Jonathan Druart
on 2025-07-16 10:40:02 UTC
(
hide
)
Description:
Bug 40410: Remove warning from Letters.
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-07-16 10:40:02 UTC
Size:
1.43 KB
patch
obsolete
>From eca0fcb083fb6c55df609614fdbc889dae8a4a45 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 16 Jul 2025 12:39:23 +0200 >Subject: [PATCH] Bug 40410: Remove warning from Letters. > >t/db_dependent/Letters.t .. 95/104 Use of uninitialized value in string eq at /kohadevbox/koha/Koha/Patron.pm line 389. > >contactname can be NULL in DB. >--- > Koha/Patron.pm | 2 +- > t/db_dependent/Letters.t | 3 ++- > 2 files changed, 3 insertions(+), 2 deletions(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index e5713dfe710..84e7d2babba 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -388,7 +388,7 @@ sub store { > > if ( C4::Context->preference('ChildNeedsGuarantor') > and ( $self->is_child or $self->category->can_be_guarantee ) >- and $self->contactname eq "" >+ and ( !defined $self->contactname || $self->contactname eq "" ) > and !@$guarantors ) > { > Koha::Exceptions::Patron::Relationship::NoGuarantor->throw(); >diff --git a/t/db_dependent/Letters.t b/t/db_dependent/Letters.t >index 4edf7c80f58..5cdf9b289d3 100755 >--- a/t/db_dependent/Letters.t >+++ b/t/db_dependent/Letters.t >@@ -19,7 +19,8 @@ > > use Modern::Perl; > use File::Basename qw(dirname); >-use Test::More tests => 104; >+use Test::More tests => 105; >+use Test::NoWarnings; > > use Test::MockModule; > use Test::Warn; >-- >2.34.1
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 40410
: 184144