From b6bc7daadfa0790d3b4dec66192fbb0ed9e77856 Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Mon, 4 Feb 2013 20:17:56 -0700 Subject: [PATCH] move mb_strlen call out of for loop definition --- include/text.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/text.php b/include/text.php index d1fff85ea3..7163a66404 100644 --- a/include/text.php +++ b/include/text.php @@ -175,7 +175,8 @@ if(! function_exists('xmlify')) { function xmlify($str) { $buffer = ''; - for($x = 0; $x < mb_strlen($str); $x ++) { + $len = mb_strlen($str); + for($x = 0; $x < $len; $x ++) { $char = $str[$x]; switch( $char ) { -- 2.39.5