aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2009-05-13 10:42:44 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2009-05-13 10:42:44 +0000
commit29cd21102d1f64483839762da8c213f4a401b3b0 (patch)
treeb0fc0a58472a1708eac86d30caa49f6554004aa0 /phpBB/includes
parentddb5a5f1462f1474a9c26c5bf6e0389e25915773 (diff)
downloadforums-29cd21102d1f64483839762da8c213f4a401b3b0.tar
forums-29cd21102d1f64483839762da8c213f4a401b3b0.tar.gz
forums-29cd21102d1f64483839762da8c213f4a401b3b0.tar.bz2
forums-29cd21102d1f64483839762da8c213f4a401b3b0.tar.xz
forums-29cd21102d1f64483839762da8c213f4a401b3b0.zip
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
Diffstat (limited to 'phpBB/includes')
-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)
{