From 29cd21102d1f64483839762da8c213f4a401b3b0 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Wed, 13 May 2009 10:42:44 +0000 Subject: [PATCH] late fix for #44845 (phpBB debug notice for some search terms) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9515 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_content.php | 5 +++++ 1 file changed, 5 insertions(+) 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) {