Better handling of an empty spamStopWords entry in the config file, for WikiPage and Post.
This commit is contained in:
parent
d17d096380
commit
ffe4b8fa2c
3 changed files with 4 additions and 4 deletions
|
|
@ -165,7 +165,7 @@ sub getAutoCommitWorkflowId {
|
|||
|
||||
# delete spam
|
||||
my $spamStopWords = $self->session->config->get('spamStopWords');
|
||||
if (ref $spamStopWords eq 'ARRAY') {
|
||||
if (ref $spamStopWords eq 'ARRAY' && @{ $spamStopWords }) {
|
||||
my $spamRegex = join('|',@{$spamStopWords});
|
||||
$spamRegex =~ s/\s/\\ /g;
|
||||
if ($self->get('content') =~ m{$spamRegex}xmsi) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue