From 0f102c95faca7d9d1db9198a2c9fb788798c4694 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 18 Jul 2014 09:14:07 -0400 Subject: [PATCH] [PASSED QA] Bug 12487 [QA Followup] - GetContract must return undef with no params Signed-off-by: Kyle M Hall --- C4/Contract.pm | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/C4/Contract.pm b/C4/Contract.pm index 57978a0..4afd670 100644 --- a/C4/Contract.pm +++ b/C4/Contract.pm @@ -92,7 +92,7 @@ sub GetContracts { =head2 GetContract -$contract = GetContract( { contractnumber => $contractnumber } ); +$contract = GetContract( { contractnumber => $contractnumber } ); Looks up the contract that has PRIMKEY (contractnumber) value $contractID @@ -104,6 +104,8 @@ sub GetContract { my ($params) = @_; my $contractnumber = $params->{contractnumber}; + return unless $contractnumber; + my $contracts = GetContracts({ contractnumber => $contractnumber, }); -- 1.7.2.5