Our local vanilla 5.3.8 always receives classes for autoloading fully-qualified without leading slash (as written in the PHP doc), but a customers 5.3.2-1ubuntu4.18 sometimes receives it with an leading slash. Simple way of handling that, breaks nothing and normally won't affect anything.
$namespaces = explode('\\', $className);
if (count($namespaces) > 1) {
$applicationPrefix = array_shift($namespaces);
+ if($applicationPrefix === '')
+ $applicationPrefix = array_shift($namespaces);
if (isset(self::$autoloadDirectories[$applicationPrefix])) {
$classPath = self::$autoloadDirectories[$applicationPrefix] . implode('/', $namespaces) . '.class.php';
if (file_exists($classPath)) {