Merge pull request #20792 from owncloud/autoloader-absolute-paths

Dont bother with stream_resolve_include_path if the path is already absolute
This commit is contained in:
Thomas Müller 2015-11-27 16:03:39 +01:00
commit 2b316eaa83

View file

@ -170,7 +170,11 @@ class Autoloader {
// No cache or cache miss
$pathsToRequire = array();
foreach ($this->findClass($class) as $path) {
$fullPath = stream_resolve_include_path($path);
if ($path[0] === '/') {
$fullPath = file_exists($path) ? $path : false;
} else {
$fullPath = stream_resolve_include_path($path);
}
if ($fullPath && $this->isValidPath($fullPath)) {
$pathsToRequire[] = $fullPath;
}