Bug 2505 : Switch on warnings in circ/returns.pl
authorColin Campbell <colin.campbell@ptfs-europe.com>
Wed, 15 Jun 2011 11:15:14 +0000 (12:15 +0100)
committerPaul Poulain <paul.poulain@biblibre.com>
Tue, 10 Apr 2012 09:30:30 +0000 (11:30 +0200)
Removed a compile time warning caused by a void context
in a bit of too clever obscure code

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
circ/returns.pl

index 83817a8..bd60d42 100755 (executable)
@@ -28,7 +28,7 @@ script to execute returns of books
 =cut
 
 use strict;
-#use warnings; FIXME - Bug 2505
+use warnings;
 
 use CGI;
 use DateTime;
@@ -223,7 +223,8 @@ if ($barcode) {
 #
     ( $returned, $messages, $issueinformation, $borrower ) =
       AddReturn( $barcode, $userenv_branch, $exemptfine, $dropboxmode);     # do the return
-    my $homeorholdingbranchreturn = C4::Context->preference('HomeOrHoldingBranchReturn') or 'homebranch';
+    my $homeorholdingbranchreturn = C4::Context->preference('HomeOrHoldingBranchReturn');
+    $homeorholdingbranchreturn ||= 'homebranch';
 
     # get biblio description
     my $biblio = GetBiblioFromItemNumber($itemnumber);