From 6751c5dc7c963defd0a31adfd46d0665abf41cd6 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 --- C4/Circulation.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index d120dfdcad..94ef6c85e7 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -3251,7 +3251,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.2