From cfa6d12fbfced143a1d4f2e5efb49bb8c0ffecd9 Mon Sep 17 00:00:00 2001 From: Bernardo Gonzalez Kriegel Date: Fri, 30 Oct 2015 08:13:51 -0300 Subject: [PATCH] Bug 15087: Fix GetHardDueDate return value This patch fixes GetHardDueDate return value in case of empty ('0000-00-00') hard due date. To test: 1) Reproduce problem in description 2) Apply the patch 3) Try again, no more problems --- C4/Circulation.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 18cc9d5..3463b54 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -1495,7 +1495,8 @@ sub GetHardDueDate { if ( defined( $rule ) ) { if ( $rule->{hardduedate} ) { - return (dt_from_string($rule->{hardduedate}, 'iso'),$rule->{hardduedatecompare}); + my $hardduedate = dt_from_string($rule->{hardduedate}); # force scalar context on dt_from_string + return ( $hardduedate, $rule->{hardduedatecompare} ); } else { return (undef, undef); } -- 1.9.1