mirror of
https://github.com/predis/predis.git
synced 2026-08-30 20:21:31 +00:00
Making autoloader act nicer to autoloaders that may be running in parallel
This commit is contained in:
@@ -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 (file_exists($filepath)) {
|
||||
require_once($filepath);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user