mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-12-22 22:50:15 +00:00
Merge pull request #717 from MrPetovan/task/advancedcontentfilter-suppress-evaluation-errors
[advancedcontentfilter] Suppress rule evaluation errors
This commit is contained in:
commit
4e72cef2f6
1 changed files with 2 additions and 1 deletions
|
@ -133,7 +133,8 @@ function advancedcontentfilter_prepare_body_content_filter(App $a, &$hook_data)
|
||||||
$rule['serialized']
|
$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) {
|
} catch (Exception $e) {
|
||||||
$found = false;
|
$found = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue