From 98b4d45a44dfa4e96783c7997ab00d3d4b89b13a Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 24 Jun 2014 15:04:37 +0100 Subject: [PATCH] Check for empty arrays in array join. --- Webperl/Utils.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/Webperl/Utils.pm b/Webperl/Utils.pm index 1485f0a..5923bbe 100644 --- a/Webperl/Utils.pm +++ b/Webperl/Utils.pm @@ -380,6 +380,7 @@ sub join_complex { } elsif(ref($value) eq "ARRAY") { croak "join_complex not given a joinstr when joining an array" unless(defined($settings{"joinstr"})); + croak "join_complex not given any content when joining an array" unless(scalar(@{$value})); return join($settings{"joinstr"}, @{$value}); } elsif(ref($value) eq "HASH") {