mirror of
https://github.com/predis/predis.git
synced 2026-09-18 22:38:42 +00:00
Make autoloader act nicer to autoloaders that may be running in parallel.
This commit is contained in:
committed by
Daniele Alessandri
parent
1f0be85a3d
commit
b865cee1f8
@@ -52,7 +52,10 @@ class Autoloader
|
||||
{
|
||||
if (0 === strpos($className, $this->prefix)) {
|
||||
$parts = explode('\\', substr($className, $this->prefixLength));
|
||||
require($this->directory.DIRECTORY_SEPARATOR.implode(DIRECTORY_SEPARATOR, $parts).'.php');
|
||||
$filepath = $this->directory.DIRECTORY_SEPARATOR.implode(DIRECTORY_SEPARATOR, $parts).'.php';
|
||||
if (is_file($filepath)) {
|
||||
require($filepath);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user