From 803f71a9fff859eef83e06cd6f6cc7503a6785df Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 5 Jan 2016 09:39:32 +0000 Subject: [PATCH] Bug 15466: Do not assume $values_in is a hashref It could be undefined. Test plan: prove t/db_dependent/Suggestions.t should return green. --- C4/Letters.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index e5c15ba..dc9574f 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -803,7 +803,7 @@ sub _parseletter { # Work on a local copy of $values_in (passed by reference) to avoid side effects # in callers ( by changing / formatting values ) - my $values = { %$values_in }; + my $values = $values_in ? { %$values_in } : {}; if ( $table eq 'borrowers' && $values->{'dateexpiry'} ){ $values->{'dateexpiry'} = format_sqldatetime( $values->{'dateexpiry'} ); -- 2.1.0