From 9aab22e0a1aa876b98dcfa58781b0ffde71f97a1 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 29 Jan 2016 16:19:46 +0200 Subject: Fix an error from 6af9dd6e24687b6a7b9d14a058a47edcac761e61 Related: #4407 --- system/helpers/text_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/helpers/text_helper.php') 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( -- cgit v1.2.3-24-g4f1b