From 8235cbb0d4b614beb69df2041bb10484e38f3ada 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit It could be undefined. Test plan: prove t/db_dependent/Suggestions.t should return green. Signed-off-by: Marc Véron Signed-off-by: Katrin Fischer Signed-off-by: Brendan A Gallagher --- C4/Letters.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index e5c15ba5d9..dc9574f39b 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.39.5