Commit 9fe25436 authored by Florido Paganelli's avatar Florido Paganelli

Fix for bug 3887 part1

parent 2b173a67
......@@ -658,10 +658,11 @@ sub addprefix {
# can have as many parameters as one wants.
sub prioritizedvalues {
my @values = @_;
my $numelements = scalar @values;
while (@values) {
my $current = shift @values;
return $current if (((defined $current) and ($current ne '')) or ((scalar @values) == 1));
return $current if (((defined $current) and ($current ne '')) or ( $numelements == 1));
}
# just in case all the above fails, log and return empty string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment