Simplified Twig_Autoloader

This commit is contained in:
Martin Hasoň
2014-01-23 12:07:16 +01:00
parent ae89c88535
commit 94fff307d7
+2 -2
View File
@@ -24,9 +24,9 @@ class Twig_Autoloader
public static function register($prepend = false)
{
if (version_compare(phpversion(), '5.3.0', '>=')) {
spl_autoload_register(array(new self, 'autoload'), true, $prepend);
spl_autoload_register(array(__CLASS__, 'autoload'), true, $prepend);
} else {
spl_autoload_register(array(new self, 'autoload'));
spl_autoload_register(array(__CLASS__, 'autoload'));
}
}