mandango/mondator — Issue #5: sys_get_temp_dir problem.
Author: RafalFilipek
Created: 2011-10-28 21:59:23+00:00
State: open

Hi!
When I was trying to generate new project there was an error

```
Fatal error: Uncaught exception 'Twig_Error_Runtime' with message 'Failed to write cache file "/tmpMondator/145569/da/88/f427770f515b6b061e40755da67c.php".' in /home/me/Php/Mandango/vendor/twig/lib/Twig/Environment.php on line 912
( ! ) Twig_Error_Runtime: Failed to write cache file "/tmpMondator/145569/da/88/f427770f515b6b061e40755da67c.php". in /home/me/Php/Mandango/vendor/twig/lib/Twig/Environment.php on line 912
```
So, there is

```
$this->twigTempDir = sys_get_temp_dir().'Mondator/'.mt_rand(111111, 999999),
```

in `ClassExtension.php` file. IMO there is missing `/` before `Mondator`. It should be

```
$this->twigTempDir = sys_get_temp_dir().'/Mondator/'.mt_rand(111111, 999999),
```

In my opinion all generated files should be stored inside project. There is some cache setting for Mandango so maybe it would be a good place to store those files.