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.

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2016-01-05 09:39:32 +00:00 committed by Brendan A Gallagher
parent 72f96d3e3b
commit 8235cbb0d4
1 changed files with 1 additions and 1 deletions

View File

@ -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'} );