summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-01-26 09:59:45 +0100
committerGitHub <noreply@github.com>2018-01-26 09:59:45 +0100
commite97165e0b57b4b90075dff1f22848868cf43c014 (patch)
treef62d2835972c915dd7f7923416c8af648e806c7a
parentec1d94c62901332b7915fce2aa22a0ee4f843830 (diff)
parentc314eb74a955e7a4f632cb80ff3ec77aa3636bbc (diff)
downloadnextcloud-server-e97165e0b57b4b90075dff1f22848868cf43c014.tar.gz
nextcloud-server-e97165e0b57b4b90075dff1f22848868cf43c014.zip
Merge pull request #8055 from nextcloud/improve-loop
Improve conditional of loop
-rw-r--r--lib/private/L10N/Factory.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php
index 8268be05d4b..a7ffb401b7b 100644
--- a/lib/private/L10N/Factory.php
+++ b/lib/private/L10N/Factory.php
@@ -407,7 +407,8 @@ class Factory implements IFactory {
$body .= ';';
$res = '';
$p = 0;
- for($i = 0; $i < strlen($body); $i++) {
+ $length = strlen($body);
+ for($i = 0; $i < $length; $i++) {
$ch = $body[$i];
switch ( $ch ) {
case '?':