From c314eb74a955e7a4f632cb80ff3ec77aa3636bbc Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Thu, 25 Jan 2018 22:33:43 +0100 Subject: [PATCH] Improve conditional of loop Signed-off-by: Morris Jobke --- lib/private/L10N/Factory.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php index 8268be05d4..a7ffb401b7 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 '?':