From c0af19301accafb5346b67aa0dae8f33ef1e458a Mon Sep 17 00:00:00 2001 From: Indranil Das Gupta Date: Fri, 3 Jul 2015 13:33:06 +0530 Subject: [PATCH] Bug 14487: silence warns during checkin Test plan ========= 1/ check out an item and then check it back in. 1/ check the logs after the check-in to see the warns from returns.pl line 623 of : (a) Use of uninitialized value $holdingBranch (b) Use of uninitialized value $collectionBranch 2/ apply patch 3/ check out and check-in again. no warns are recorded this time. NOTE: Under Debian Jessie, there are other messages. Additionally, this only corrects the line 623 ones. Signed-off-by: Mark Tompsett Signed-off-by: Nick Clemens Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 0d632a606f499c31afb8a08f81625c4dfbddb445) Signed-off-by: Chris Cormack --- circ/returns.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/circ/returns.pl b/circ/returns.pl index 8b70e1a31a..304e8012c3 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -616,6 +616,8 @@ $template->param( $itemnumber = GetItemnumberFromBarcode( $query->param('barcode') ); if ( $itemnumber ) { my ( $holdingBranch, $collectionBranch ) = GetCollectionItemBranches( $itemnumber ); + $holdingBranch //= ''; + $collectionBranch //= ''; if ( ! ( $holdingBranch eq $collectionBranch ) ) { $template->param( collectionItemNeedsTransferred => 1, -- 2.39.5