projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
a20a46a
)
fixed the autoloader for PHP 5.2
author
Fabien Potencier
<fabien.potencier@gmail.com>
Wed, 1 May 2013 06:42:32 +0000 (08:42 +0200)
committer
Fabien Potencier
<fabien.potencier@gmail.com>
Wed, 1 May 2013 06:42:53 +0000 (08:42 +0200)
lib/Twig/Autoloader.php
patch
|
blob
|
history
diff --git
a/lib/Twig/Autoloader.php
b/lib/Twig/Autoloader.php
index
b09a2cc
..
7007d31
100644
(file)
--- a/
lib/Twig/Autoloader.php
+++ b/
lib/Twig/Autoloader.php
@@
-23,7
+23,11
@@
class Twig_Autoloader
*/
public static function register($prepend = false)
{
- spl_autoload_register(array(new self, 'autoload'), true, $prepend);
+ if (version_compare(phpversion(), '5.3.0', '>=')) {
+ spl_autoload_register(array(new self, 'autoload'), true, $prepend);
+ } else {
+ spl_autoload_register(array(new self, 'autoload'));
+ }
}
/**