Bugzilla – Attachment 129630 Details for
Bug 29826
Manage call of Template Plugin Branches GetName() with null or empty branchcode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29826: Remove warning in t/db_dependent/Template/Plugin/Branches.t
Bug-29826-Remove-warning-in-tdbdependentTemplatePl.patch (text/plain), 1.28 KB, created by
David Nind
on 2022-01-19 23:26:45 UTC
(
hide
)
Description:
Bug 29826: Remove warning in t/db_dependent/Template/Plugin/Branches.t
Filename:
MIME Type:
Creator:
David Nind
Created:
2022-01-19 23:26:45 UTC
Size:
1.28 KB
patch
obsolete
>From 5f8ee175e318cd8211afb75a76d4ad2d24e0631f Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Fri, 7 Jan 2022 15:34:49 -1000 >Subject: [PATCH] Bug 29826: Remove warning in > t/db_dependent/Template/Plugin/Branches.t > >Bug 26587 added a concatenation that sends a warning if var is undef : >$ prove t/db_dependent/Template/Plugin/Branches.t >Use of uninitialized value $branchcode in concatenation (.) or string at /kohadevbox/koha/Koha/Template/Plugin/Branches.pm line 35. > >This patch adds an early return empty string when GetName is called >without $branchcode > >Test plan : >1) Run t/db_dependent/Template/Plugin/Branches.t without patch >2) Run with the patch to see warning disappear > >Signed-off-by: David Nind <david@davidnind.com> >--- > Koha/Template/Plugin/Branches.pm | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/Koha/Template/Plugin/Branches.pm b/Koha/Template/Plugin/Branches.pm >index 8f82e0217a..82884de7c5 100644 >--- a/Koha/Template/Plugin/Branches.pm >+++ b/Koha/Template/Plugin/Branches.pm >@@ -30,6 +30,7 @@ use Koha::Libraries; > > sub GetName { > my ( $self, $branchcode ) = @_; >+ return q{} unless defined $branchcode; > > my $memory_cache = Koha::Cache::Memory::Lite->get_instance; > my $cache_key = "Library_branchname:" . $branchcode; >-- >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 29826
:
129208
|
129630
|
130030
|
130201
|
131183