bug #2043 Fix load cache (MaCroTux)

This PR was squashed before being merged into the 1.x branch (closes #2043).

Discussion
----------

Fix load cache

In PHP7 @ do not works and it is resource expensive, switching to if statement.

Commits
-------

b5df3d1 Fix load cache
This commit is contained in:
Fabien Potencier
2016-06-21 09:04:26 +02:00
+1 -1
View File
@@ -46,7 +46,7 @@ class Twig_Cache_Filesystem implements Twig_CacheInterface
*/
public function load($key)
{
@include_once $key;
if (file_exists($key)) @include_once $key;
}
/**