aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/viewtopic.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 658ff56e4a..1bc7ef27d9 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -500,11 +500,14 @@ if( isset($HTTP_GET_VARS['highlight']) )
for($i = 0; $i < count($words); $i++)
{
- $highlight_match[] = "#\b(" . str_replace("\*", ".*?", preg_quote($words[$i], "#")) . ")\b#i";
- $highlight_replace[] = "<font color=\"#FF0000\"><b>\\1</b></font>";
+ if( trim($words[$i] != "" )
+ {
+ $highlight_match[] = "#\b(" . str_replace("\*", ".*?", preg_quote($words[$i], "#")) . ")\b#i";
+ $highlight_replace[] = "<font color=\"#FF0000\"><b>\\1</b></font>";
+ }
}
- $highlight_active = ( count($words) ) ? true : false;
+ $highlight_active = ( count($highlight_match) ) ? true : false;
}
else