Commit f837baa7 authored by Steven Jones's avatar Steven Jones

Issue #1333710 by Steven Jones: Fixed Autoloader doesn't work in PHP 5.2.

parent b4b2d377
......@@ -189,7 +189,14 @@ class UniversalClassLoader
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
// We need a special call to the autoloader for PHP 5.2, missing the
// third parameter.
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
spl_autoload_register(array($this, 'loadClass'), true);
}
else {
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment