summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-01-29 15:19:46 +0100
committerAndrey Andreev <narf@devilix.net>2016-01-29 15:19:46 +0100
commit9aab22e0a1aa876b98dcfa58781b0ffde71f97a1 (patch)
tree95f6df0595b58473db456ca333618dd88bc6d98a /system
parent6af9dd6e24687b6a7b9d14a058a47edcac761e61 (diff)
Related: #4407
Diffstat (limited to 'system')
-rw-r--r--system/helpers/text_helper.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php
index 79aaf1492..4f9210f2d 100644
--- a/system/helpers/text_helper.php
+++ b/system/helpers/text_helper.php
@@ -287,7 +287,7 @@ if ( ! function_exists('word_censor'))
elseif (preg_match_all("/{$delim}(".$badword."){$delim}/i", $str, $matches, PREG_PATTERN_ORDER | PREG_OFFSET_CAPTURE))
{
$matches = $matches[1];
- for ($i = count($matches); $i >= 0; $i--)
+ for ($i = count($matches) - 1; $i >= 0; $i--)
{
$length = strlen($matches[$i][0]);
$str = substr_replace(