Skip to content

Commit

Permalink
[BUGFIX] Check if pattern is empty before it is used
Browse files Browse the repository at this point in the history
  • Loading branch information
lochmueller committed Feb 4, 2018
1 parent b2f025c commit 655f2c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Manipulation/RemoveComments.php
Expand Up @@ -67,7 +67,7 @@ protected function keepComment($commentHtml)
$commentHtml = str_replace("-->", "", $commentHtml);
$commentHtml = trim($commentHtml);
foreach ($this->whiteListCommentsPatterns as $pattern) {
if (preg_match($pattern, $commentHtml)) {
if (!empty($pattern) && preg_match($pattern, $commentHtml)) {
return true;
}
}
Expand Down

0 comments on commit 655f2c8

Please sign in to comment.