Skip to content

Instantly share code, notes, and snippets.

@davidrothera
Last active December 19, 2015 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidrothera/6022968 to your computer and use it in GitHub Desktop.
Save davidrothera/6022968 to your computer and use it in GitHub Desktop.
Description: If the array is empty, we return an empty string.
Origin: vendor
Bug-Debian: http://bugs.debian.org/593043
Author: Raphaël Hertzog <hertzog@debian.org>
Reviewed-by: gregor herrmann <gregoa@debian.org>
Last-Update: 2012-06-05
--- a/Simple.pm
+++ b/Simple.pm
@@ -471,6 +471,7 @@
}
defined($rv) or return;
+ return "" if scalar(@$rv) == 0;
for ( my $i=0; $i < @$rv; $i++ ) {
$rv->[$i] =~ s/\\n/\n/g;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment