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
This commit is contained in:
Meik Sievertsen 2009-05-13 10:42:44 +00:00
parent ddb5a5f146
commit 29cd21102d

View file

@ -261,6 +261,11 @@ function get_context($text, $words, $length = 400)
{ {
if (preg_match('#(?:[^\w]|^)(' . $word . ')(?:[^\w]|$)#i', $text, $match)) if (preg_match('#(?:[^\w]|^)(' . $word . ')(?:[^\w]|$)#i', $text, $match))
{ {
if (empty($match[1]))
{
continue;
}
$pos = utf8_strpos($text, $match[1]); $pos = utf8_strpos($text, $match[1]);
if ($pos !== false) if ($pos !== false)
{ {