fabpot/Twig — pull request #693 by Tobion (2012-04-09 07:35:44+00:00)
Title: Fixed random function when charset is null

Fixed random function when charset is null and the value is an empty string, resulting in an mt_rand error max(-1) is smaller than min(0).
Also fixed a test on windows.

But I don't know why you introduced the special handling for `null === $env->getCharset()`.
Why is that necessary and why is it possible to have a null charset at all? Usually it defaults to utf-8 anyway.