test logFile before doing regexps on it

This commit is contained in:
Isaac Connor 2020-05-11 18:35:31 -04:00
parent 77b4dd6b35
commit 323c171a27
1 changed files with 1 additions and 1 deletions

View File

@ -490,7 +490,7 @@ sub closeSyslog {
sub logFile {
my $this = shift;
my $logFile = shift;
if ( $logFile =~ /^(.+)\+$/ ) {
if ( $logFile and ( $logFile =~ /^(.+)\+$/ ) ) {
$this->{logFile} = $1.'.'.$$;
} else {
$this->{logFile} = $logFile;