From 3e8074b5aedb5cc2ec4d2df983e947b07a6c2cf2 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 10 Feb 2014 13:28:16 +0100 Subject: [PATCH] Bug 11732: Eliminate warning on undefined branchcode Content-Type: text/plain; charset=utf-8 When you run the Reserves test, you have the warnings: Use of uninitialized value $branchcode in hash element at /usr/share/koha/testclone/C4/Letters.pm line 138. Use of uninitialized value $branchcode in hash element at /usr/share/koha/testclone/C4/Letters.pm line 148. This patch removes that warning. Test plan: Run the Reserves.t again. --- C4/Letters.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index 2595369..0def82b 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -132,7 +132,7 @@ sub getletter { and $branchcode and C4::Context->userenv ) { - $branchcode = C4::Context->userenv->{'branch'}; + $branchcode = C4::Context->userenv->{'branch'}//''; } if ( my $l = $letter{$module}{$code}{$branchcode} ) { -- 1.7.7.6