projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
5fd428e
)
Fix for mb function overload mb_substr acting different
author
1emming
<megatron001@gmail.com>
Sun, 27 Jul 2014 15:37:04 +0000 (17:37 +0200)
committer
Fabien Potencier
<fabien.potencier@gmail.com>
Mon, 28 Jul 2014 13:11:49 +0000 (15:11 +0200)
lib/Twig/Extension/Core.php
patch
|
blob
|
history
diff --git
a/lib/Twig/Extension/Core.php
b/lib/Twig/Extension/Core.php
index
750ef0f
..
04a6f23
100644
(file)
--- a/
lib/Twig/Extension/Core.php
+++ b/
lib/Twig/Extension/Core.php
@@
-702,7
+702,7
@@
function twig_slice(Twig_Environment $env, $item, $start, $length = null, $prese
$item = (string) $item;
if (function_exists('mb_get_info') && null !== $charset = $env->getCharset()) {
- return mb_substr($item, $start, null === $length ? mb_strlen($item, $charset) - $start : $length, $charset);
+ return (string) mb_substr($item, $start, null === $length ? mb_strlen($item, $charset) - $start : $length, $charset);
}
return null === $length ? substr($item, $start) : substr($item, $start, $length);