fix(core): unitiliazed error if no safe module installed (#3135)

This commit is contained in:
qgarnier 2021-09-23 15:56:38 +02:00 committed by GitHub
parent 2e914346ae
commit dd69bc959c
1 changed files with 2 additions and 1 deletions

View File

@ -927,7 +927,8 @@ sub test_eval {
if ($@) {
die 'Unsafe code evaluation: ' . $@;
}
} else {
} elsif (defined($options{values}) {
# unsafe code execution. don't need to check if it's safe (with no values)
my $values = $options{values};
$result = eval "$options{test}";
}