From 4819f61b7bcc32c68c76f4fe006f9b3605073ab0 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 (cherry picked from commit 8235cbb0d4b614beb69df2041bb10484e38f3ada) Signed-off-by: Julian Maurice --- C4/Letters.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index d07d33f997..67753dcbb1 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -801,7 +801,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