From: Fabien Potencier Date: Mon, 28 Jul 2014 13:12:00 +0000 (+0200) Subject: bug #1453 Fix for mb function overload mb_substr acting different (1emming) X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=7d1577ff3c563aff7c447302d57756fd40fc675b;p=konrad%2Ftwig.git bug #1453 Fix for mb function overload mb_substr acting different (1emming) This PR was squashed before being merged into the 1.16-dev branch (closes #1453). Discussion ---------- Fix for mb function overload mb_substr acting different When bug hunting https://github.com/fabpot/Twig/issues/1428 I ran into an issue. I started out by changing my `php.ini` for the `cli` enviroment, I've added: `mbstring.func_overload = 2` Later I tested with adding and removing: `mbstring.internal_encoding = 'UTF-8'` It turns out `mb_substr` returns `false` and not `''` when doing something like this: ```php $item = ''; $start = -1; $length = 1; $charset = 'UTF-8'; $a = mb_substr($item, $start, $length, $charset); var_dump($a); die; ``` I'm not sure this will fix 1428 since I don't have enough information for this, but this PR should at least fix one issue. Commits ------- 214fe52 Fix for mb function overload mb_substr acting different --- 7d1577ff3c563aff7c447302d57756fd40fc675b