diff options
author | Björn Schießle <schiessle@owncloud.com> | 2012-09-18 16:14:04 +0200 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2012-09-18 16:14:04 +0200 |
commit | 2570ea7114a1b6db76d3b1f1f9fce311cbece500 (patch) | |
tree | bf3f73922fc1e1a297cf5bc9045ea067b110b5ff /lib/helper.php | |
parent | dc0dc56d481844f55d08b08736b6ce8d7d2918e1 (diff) | |
download | nextcloud-server-2570ea7114a1b6db76d3b1f1f9fce311cbece500.tar.gz nextcloud-server-2570ea7114a1b6db76d3b1f1f9fce311cbece500.zip |
don't interpret strpos '0' as 'false' in while loop
Diffstat (limited to 'lib/helper.php')
-rw-r--r-- | lib/helper.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/helper.php b/lib/helper.php index dda5fcc5f0c..e70379d1731 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -657,7 +657,7 @@ class OC_Helper { public static function mb_str_replace($search, $replace, $subject, $encoding = 'UTF-8', &$count = null) { $offset = -1; $length = mb_strlen($search, $encoding); - while(($i = mb_strrpos($subject, $search, $offset, $encoding))) { + while(($i = mb_strrpos($subject, $search, $offset, $encoding)) !== false ) { $subject = OC_Helper::mb_substr_replace($subject, $replace, $i, $length); $offset = $i - mb_strlen($subject, $encoding) - 1; $count++; |