diff options
author | Andrey Andreev <narf@devilix.net> | 2016-01-29 15:19:46 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2016-01-29 15:19:46 +0100 |
commit | 9aab22e0a1aa876b98dcfa58781b0ffde71f97a1 (patch) | |
tree | 95f6df0595b58473db456ca333618dd88bc6d98a | |
parent | 6af9dd6e24687b6a7b9d14a058a47edcac761e61 (diff) |
Fix an error from 6af9dd6e24687b6a7b9d14a058a47edcac761e61
Related: #4407
-rw-r--r-- | system/helpers/text_helper.php | 2 |
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( |