Guard against empty non existant page id key value

This commit is contained in:
Roan Horning 2022-07-31 15:14:03 -04:00
parent 74b806f712
commit 2a61d89907
Signed by untrusted user: rho_n
GPG Key ID: 234AEF20B72D5769

View File

@ -238,7 +238,10 @@ sub get_filename {
}
else {
$filename = $$config{'filename'};
my $padded_index = sprintf("%04d", $$config{'id'});
my $padded_index = "";
if ($$config{'id'}) {
$padded_index = sprintf("%04d", $$config{'id'});
}
$filename =~ s/\[id\]/$padded_index/;
return $filename;
}