From 1e95b94ea0c2e0115227c6cbf90cfae5dd0c5feb Mon Sep 17 00:00:00 2001 From: Josef Moravec Date: Thu, 25 Apr 2019 08:25:42 +0000 Subject: [PATCH] Bug 22511: (QA follow-up) Fix update database Test plan: Run db update (and have some voided accountlines) --> without patch it fails with error message similar to: Can't use string ("Payment") as a HASH ref while "strict refs" in use at (eval 1393) line 19. --> with patch it runs as expected Signed-off-by: Josef Moravec Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens --- installer/data/mysql/atomicupdate/bug_22511.perl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_22511.perl b/installer/data/mysql/atomicupdate/bug_22511.perl index 4447428..4ec384b 100644 --- a/installer/data/mysql/atomicupdate/bug_22511.perl +++ b/installer/data/mysql/atomicupdate/bug_22511.perl @@ -15,7 +15,7 @@ if ( CheckVersion($DBversion) ) { $sth->execute(); while (my $row = $sth->fetchrow_hashref) { $sth2->execute($row->{accountlines_id}); - my $result = $sth2->fetchrow; + my $result = $sth2->fetchrow_hashref; my $type = $types_map->{$result->{'type'}} // 'Pay'; $sth3->execute($type,$row->{accountlines_id}); } -- 1.7.2.5