From ff6de99ae4f353f793c95208ad6407ac59a63376 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Sun, 13 Oct 2013 10:12:43 -0400 Subject: [PATCH] Some micro-optimizations --- program/lib/Roundcube/rcube_utils.php | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/program/lib/Roundcube/rcube_utils.php b/program/lib/Roundcube/rcube_utils.php index 771602f..b73bc08 100644 --- a/program/lib/Roundcube/rcube_utils.php +++ b/program/lib/Roundcube/rcube_utils.php @@ -454,8 +454,8 @@ // cut out all contents between { and } while (($pos = strpos($source, '{', $last_pos)) && ($pos2 = strpos($source, '}', $pos))) { - $styles = substr($source, $pos+1, $pos2-($pos+1)); - $length = strlen($styles); + $length = $pos2 - $pos - 1; + $styles = substr($source, $pos+1, $length); // check every line of a style block... if ($allow_remote) { -- Gitblit v1.9.1