[advancedcontentfilter] Suppress rule evaluation errors #717

Merged
MrPetovan merged 1 commits from task/advancedcontentfilter-suppress-evaluation-errors into develop 2018-08-23 06:14:39 +02:00
1 changed files with 2 additions and 1 deletions

View File

@ -133,7 +133,8 @@ function advancedcontentfilter_prepare_body_content_filter(App $a, &$hook_data)
$rule['serialized']
);
$found = (bool) $expressionLanguage->evaluate($serializedParsedExpression, $vars);
// The error suppression operator is used because of potentially broken user-supplied regular expressions
$found = (bool) @$expressionLanguage->evaluate($serializedParsedExpression, $vars);
} catch (Exception $e) {
$found = false;
}