diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-10-23 23:27:15 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-10-24 12:27:53 +0200 |
commit | d060180140923ac054b252f0cbd821063a53f5b7 (patch) | |
tree | 59d53bb16be35960f493709d8409a75bc79be47e /lib/private/vobject.php | |
parent | 9739a25547e5f8f7500b0a962780cb9267b47cd1 (diff) | |
download | nextcloud-server-d060180140923ac054b252f0cbd821063a53f5b7.tar.gz nextcloud-server-d060180140923ac054b252f0cbd821063a53f5b7.zip |
Use function outside of loop
Otherwise the function is executed n times which is a lot of overhead
Diffstat (limited to 'lib/private/vobject.php')
-rw-r--r-- | lib/private/vobject.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/vobject.php b/lib/private/vobject.php index 94e3470ff08..9d121c17d79 100644 --- a/lib/private/vobject.php +++ b/lib/private/vobject.php @@ -72,7 +72,8 @@ class OC_VObject{ */ public static function unescapeSemicolons($value) { $array = explode(';', $value); - for($i=0;$i<count($array);$i++) { + $arrayCount = count($array); + for($i = 0; $i < $arrayCount; $i++) { if(substr($array[$i], -2, 2)=="\\\\") { if(isset($array[$i+1])) { $array[$i] = substr($array[$i], 0, count($array[$i])-2).';'.$array[$i+1]; |