aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_content.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions_content.php')
-rw-r--r--phpBB/includes/functions_content.php5
1 files changed, 5 insertions, 0 deletions
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)
{