aboutsummaryrefslogtreecommitdiffstats
path: root/lib/helper.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/helper.php')
-rw-r--r--lib/helper.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/helper.php b/lib/helper.php
index 0d18098a4e7..c4f7e8b2e19 100644
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -676,10 +676,10 @@ class OC_Helper {
*/
public static function mb_str_replace($search, $replace, $subject, $encoding = 'UTF-8', &$count = null) {
$offset = -1;
- $length = mb_strlen($search, 'UTF-8');
- while(($i = mb_strrpos($subject, $search, $offset, 'UTF-8'))) {
+ $length = mb_strlen($search, $encoding);
+ while(($i = mb_strrpos($subject, $search, $offset, $encoding))) {
$subject = OC_Helper::mb_substr_replace($subject, $replace, $i, $length);
- $offset = $i - mb_strlen($subject, 'UTF-8') - 1;
+ $offset = $i - mb_strlen($subject, $encoding) - 1;
$count++;
}
return $subject;