Fabien Potencier 7d1577ff3c 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
2014-07-28 15:12:00 +02:00
2014-07-08 15:46:25 +02:00
2014-07-07 14:54:10 +02:00
2014-07-07 14:54:10 +02:00
2013-11-11 20:04:42 +01:00

Twig, the flexible, fast, and secure template language for PHP
==============================================================

Twig is a template language for PHP, released under the new BSD license (code
and documentation).

Twig uses a syntax similar to the Django and Jinja template languages which
inspired the Twig runtime environment.

More Information
----------------

Read the `documentation`_ for more information.

.. _documentation: http://twig.sensiolabs.org/documentation
Languages
PHP 99.9%