From: Jordi Boggiano Date: Wed, 23 Mar 2011 15:39:25 +0000 (+0100) Subject: Ensure all mbstring calls have the charset specified X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=214af8f9b5588177df458ac736e2203e8c20d413;p=konrad%2Ftwig.git Ensure all mbstring calls have the charset specified --- diff --git a/lib/Twig/Extension/Core.php b/lib/Twig/Extension/Core.php index 2d679f9..9a34d6a 100644 --- a/lib/Twig/Extension/Core.php +++ b/lib/Twig/Extension/Core.php @@ -423,8 +423,8 @@ if (function_exists('mb_get_info')) { function twig_capitalize_string_filter(Twig_Environment $env, $string) { if (null !== ($charset = $env->getCharset())) { - return mb_strtoupper(mb_substr($string, 0, 1, $charset)). - mb_strtolower(mb_substr($string, 1, mb_strlen($string), $charset), $charset); + return mb_strtoupper(mb_substr($string, 0, 1, $charset), $charset). + mb_strtolower(mb_substr($string, 1, mb_strlen($string, $charset), $charset), $charset); } return ucfirst(strtolower($string));