From 41f12d9edaecb2857f8823ef59748f974a79879a Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 28 Aug 2013 15:16:28 +0000 Subject: [PATCH] Bug 10693: (follow-up) fix parameter checking in CreateBranchTransferLimit() There is nothing prevent '0' from being used as a library code. To test: Run prove -v t/db_dependent/Circulation_transfers.t and verify that the tests pass. Signed-off-by: Galen Charlton (cherry picked from commit 6751c5dc7c963defd0a31adfd46d0665abf41cd6) Signed-off-by: Tomas Cohen Arazi --- C4/Circulation.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 258421c350..746d9067ae 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -3245,7 +3245,7 @@ $code is either itemtype or collection code depending on what the pref BranchTra sub CreateBranchTransferLimit { my ( $toBranch, $fromBranch, $code ) = @_; - return unless ($toBranch && $fromBranch); + return unless defined($toBranch) && defined($fromBranch); my $limitType = C4::Context->preference("BranchTransferLimitsType"); my $dbh = C4::Context->dbh; -- 2.39.5