diff --git a/mysqltuner.pl b/mysqltuner.pl index 2bb7c09..22ec64c 100755 --- a/mysqltuner.pl +++ b/mysqltuner.pl @@ -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;