Trim sub with emtpy string display error #376

This commit is contained in:
Jean-Marie RENOUARD 2018-04-04 15:20:27 +02:00
parent b9721ef91b
commit 61cdd6c0d0

View file

@ -5059,6 +5059,7 @@ sub mariadb_connect {
# Perl trim function to remove whitespace from the start and end of the string
sub trim {
my $string = shift;
return "" unless defined($string);
$string =~ s/^\s+//;
$string =~ s/\s+$//;
return $string;