diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index 23cbff7e8f..3107177137 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -261,6 +261,11 @@ function get_context($text, $words, $length = 400) { if (preg_match('#(?:[^\w]|^)(' . $word . ')(?:[^\w]|$)#i', $text, $match)) { + if (empty($match[1])) + { + continue; + } + $pos = utf8_strpos($text, $match[1]); if ($pos !== false) {