Updated file_exists() to is_file() and changed require_once() to require() per Predis' author's suggestions

This commit is contained in:
Irakli Nadareishvili
2012-05-26 08:14:29 -03:00
parent 703c3ceb90
commit 4f16e232a8
+2 -2
View File
@@ -53,8 +53,8 @@ class Autoloader
if (0 === strpos($className, $this->prefix)) {
$parts = explode('\\', substr($className, $this->prefixLength));
$filepath = $this->directory.DIRECTORY_SEPARATOR.implode(DIRECTORY_SEPARATOR, $parts).'.php';
if (file_exists($filepath)) {
require_once($filepath);
if (is_file($filepath)) {
require($filepath);
}
}
}