From a11f3f9bef35359662ab4c85cb1d5f4622d78d83 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 15 Jul 2021 12:50:35 +0000 Subject: [PATCH] Bug 20817: (QA follow-up) Fix _trim The patch 'trim should always return a value' does not completely do the job yet. And might have unwanted effects for the '0' case. Signed-off-by: Marcel de Rooy --- acqui/neworderempty.pl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl index aca14aaef9..85b1c88cf8 100755 --- a/acqui/neworderempty.pl +++ b/acqui/neworderempty.pl @@ -696,10 +696,8 @@ sub staged_items_field { return (\%cellrecord); } - sub _trim { - my $string = shift; - return unless $string; + my $string = shift // q{}; $string =~ s/^\s+|\s+$//g; - return $string // q{}; + return $string; } -- 2.30.2